ResetUserPassword
Resets the password of a user.
Operation description
When a user forgets their password, the password expires, or the password poses a security risk, a CloudSSO administrator can reset the password for the user.
You cannot reset user passwords after single sign-on (SSO) is enabled.
This topic provides an example of resetting the password of the user u-00q8wbq42wiltcrk**** by using a system-generated password.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cloudsso:ResetUserPassword |
update |
*User
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DirectoryId |
string |
Yes |
The directory ID. |
d-00fc2p61**** |
| UserId |
string |
Yes |
The user ID. |
u-00q8wbq42wiltcrk**** |
| Password |
string |
No |
The new password. Format: The password must contain at least one uppercase letter, one lowercase letter, one digit, and one special character. Length: 8 to 32 characters. Note
If |
uc)XK$?ictf72CKFDy9vtWaFmISl**** |
| GenerateRandomPassword |
boolean |
No |
Specifies whether to automatically generate a password. This parameter is valid only when the reset method is DirectPassword. Valid values:
|
True |
| RequirePasswordResetForNextLogin |
boolean |
No |
Specifies whether the user must reset the password upon next logon. Valid values:
|
False |
| ResetMethod |
string |
No |
The reset method. Valid values:
|
DirectPassword |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned result. |
||
| NewPassword |
string |
The new password. Note
This parameter is returned only when the password is automatically generated by the system. |
W2koInFIm0Wy2wVZ$oB)MzD$nY!G**** |
| RequestId |
string |
The request ID. |
F44F02EC-70D1-5E51-8E8E-FA9AC4EF952A |
Examples
Success response
JSON format
{
"NewPassword": "W2koInFIm0Wy2wVZ$oB)MzD$nY!G****",
"RequestId": "F44F02EC-70D1-5E51-8E8E-FA9AC4EF952A"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.