Resets the password of a user.

Usage notes

If you forget your password or your password expires or is at risk, you must contact a CloudSSO administrator to reset your password.

Note After you enable SSO logon, your password cannot be reset.

This topic provides an example on how to reset the password of the user u-00q8wbq42wiltcrk****. The new password is automatically generated by the system.

Limits

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.

Debugging

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 ResetUserPassword

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

DirectoryId String Yes d-00fc2p61****

The ID of the directory.

UserId String Yes u-00q8wbq42wiltcrk****

The ID of the user.

Password String No uc)XK$?ictf72CKFDy9vtWaFmISl****

The new password.

The password must contain the following types of characters: uppercase letters, lowercase letters, digits, and special characters.

The password must be 8 to 32 characters in length.

Note If you set GenerateRandomPassword to False, you must specify Password .
GenerateRandomPassword Boolean No True

Specifies whether to enable the system to automatically generate a new password. Valid values:

  • True: The new password is automatically generated by the system.
  • False: The new password must be manually specified. This is the default value.
RequirePasswordResetForNextLogin Boolean No False

Specifies whether password reset is required upon the next logon. Valid values:

  • True: Password reset is required upon the next logon.
  • False: Password reset is not required upon the next logon. This is the default value.

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

Response parameters

Parameter Type Example Description
NewPassword String W2koInFIm0Wy2wVZ$oB)MzD$nY!G****

The new password.

Note This parameter is returned only when the new password is automatically generated by the system.
RequestId String F44F02EC-70D1-5E51-8E8E-FA9AC4EF952A

The ID of the request.

Examples

Sample requests

https://[Endpoint]/?Action=ResetUserPassword
&DirectoryId=d-00fc2p61****
&UserId=u-00q8wbq42wiltcrk****
&GenerateRandomPassword=True
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ResetUserPasswordResponse>
    <NewPassword>W2koInFIm0Wy2wVZ$oB)MzD$nY!G****</NewPassword>
    <RequestId>F07A9FF3-B22F-5ACF-8825-89483B96F2FD</RequestId>
</ResetUserPasswordResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "NewPassword" : "W2koInFIm0Wy2wVZ$oB)MzD$nY!G****",
  "RequestId" : "F07A9FF3-B22F-5ACF-8825-89483B96F2FD"
}

Error codes

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