Delete users
Permanently remove a user from App Context storage with Delete() or DeleteUser().
Both methods produce the same result. Call Delete() on a User object or DeleteUser() on the Chat object with the user ID.
Soft delete deprecated
Soft deletion for users has been deprecated. Delete() now always performs a hard delete. Use Delete() without any parameters to permanently remove a user. The soft parameter and Restore() method are no longer available for users.
Requires App Context
Enable App Context in the Admin Portal to store user data.
Method signature
These methods take the following parameters:
-
Delete()(on theUserobject)1user.Delete() -
DeleteUser()(on theChatobject)1chat.DeleteUser(string userId)
Input
| Parameter | Required in Delete() | Required in DeleteUser() | Description |
|---|---|---|---|
userIdType: stringDefault: n/a | No | Yes | Unique user identifier (up to 92 UTF-8 characters). |
Output
| Type | Description |
|---|---|
Task<ChatOperationResult> | Returned Task that you can await to get the result of the delete operation. |
Sample code
Permanently delete user support_agent_15.
-
Delete()(on theUserobject)1 -
DeleteUser()(on theChatobject)1