Deletes a user.


The user that you want to delete is not associated with the following resources. If the user is associated with the resources, the deletion fails.

  • Multi-factor authentication (MFA) devices: You must unbind the MFA devices from the user. For more information, see DeleteMFADeviceForUser.
  • Access permissions: You must remove the access permissions on the accounts in your resource directory from the user. For more information, see DeleteAccessAssignment.
  • Groups: You must remove the user from groups. For more information, see RemoveUserFromGroup.

Usage notes

If System for Cross-domain Identity Management (SCIM) synchronization is enabled, you cannot delete a user that is synchronized by using SCIM.

This topic provides an example on how to delete the user whose ID is u-00q8wbq42wiltcrk****.


You can call this operation up to 100 times per second per account. This operation is globally limited to 100 times per second across all accounts. If the number of the calls per second exceeds a limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limits when you call this operation.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DeleteUser

The operation that you want to perform. Set the value to DeleteUser.

DirectoryId String Yes d-00fc2p61****

The ID of the directory.

UserId String Yes u-00q8wbq42wiltcrk****

The ID of the user.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String E598602-AC67-56EF-B7CC-2927C30AA0A8

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK

<?xml version="1.0" encoding="UTF-8" ?>

JSON format

HTTP/1.1 200 OK

  "RequestId" : "EE598602-AC67-56EF-B7CC-2927C30AA0A8"

Error codes

For a list of error codes, visit the API Error Center.