Deletes a user from a CloudSSO directory.
Operation description
Prerequisites
Before you delete a user, make sure the user is not associated with the following resources. Otherwise, the deletion fails.
-
Multi-factor authentication (MFA) devices: You must delete the MFA devices bound to the user. For more information, see DeleteMFADeviceForUser.
-
Access permissions: You must remove the user's access permissions on the accounts in your resource directory. For more information, see DeleteAccessAssignment.
-
Groups: You must remove the user from groups. For more information, see RemoveUserFromGroup.
Precautions
If System for Cross-domain Identity Management (SCIM) synchronization is enabled, you cannot delete a SCIM-synchronized user.
The following example deletes the user whose ID is u-00q8wbq42wiltcrk****.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cloudsso:DeleteUser |
delete |
*User
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DirectoryId |
string |
Yes |
The ID of the CloudSSO directory. |
d-00fc2p61**** |
| UserId |
string |
Yes |
The ID of the user. |
u-00q8wbq42wiltcrk**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned. |
||
| RequestId |
string |
The request ID. |
E598602-AC67-56EF-B7CC-2927C30AA0A8 |
Examples
Success response
JSON format
{
"RequestId": "E598602-AC67-56EF-B7CC-2927C30AA0A8"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.