All Products
Search
Document Center

CloudSSO:SetPasswordPolicy

Last Updated:Mar 29, 2024

Configures a password policy for CloudSSO users.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DirectoryIdstringYes

The ID of the directory.

d-00fc2p61****
MinPasswordLengthintegerNo

The minimum password length.

Valid values: 8 to 32 characters.

8
MinPasswordDifferentCharsintegerNo

The minimum number of unique characters in a password.

The minimum value is 0, which specifies that the minimum number of unique characters in a password is not limited. The maximum value is the value of the MinPasswordLength parameter.

8
PasswordNotContainUsernamebooleanNo

Specifies whether a password can contain the username. Valid value:

  • true: A password cannot contain the username.
  • false: A password can contain the username.
true
MaxPasswordAgeintegerNo

The validity period of a password.

Valid values: 1 to 120. Unit: days.

90
PasswordReusePreventionintegerNo

The policy for password history check.

The previous N passwords cannot be reused. Valid values of N: 0 to 24. The value 0 specifies that all historical passwords can be reused.

Note Passwords that are generated before January 5, 2024 are not counted as historical passwords.
1
MaxLoginAttemptsintegerNo

The number of password retries.

If you enter wrong passwords for the specified consecutive times, the account is locked for 1 hour.

Valid values: 0 to 32. The value 0 specifies that the number of password retries is not limited.

5

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

RequestIdstring

The request ID.

768F908D-A66A-5A5D-816C-20C93CBBFEE3

Examples

Sample success responses

JSONformat

{
  "RequestId": "768F908D-A66A-5A5D-816C-20C93CBBFEE3"
}

Error codes

For a list of error codes, visit the Service error codes.