- HTTP request
- Query parameters
- Request body
- Response body
- Authorization scopes
- CustomStrengthOptions
- EnforcementState
- Try it!
Gets password policy config set on the project or tenant.
HTTP request
GET https://identitytoolkit.googleapis.com/v2/passwordPolicy
The URL uses gRPC Transcoding syntax.
Query parameters
Parameters | |
---|---|
tenantId
|
The id of a tenant. |
Request body
The request body must be empty.
Response body
Configuration for password policy.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "customStrengthOptions" : { object ( |
Fields | |
---|---|
customStrengthOptions
|
The custom strength options enforced by the password policy. |
schemaVersion
|
Output only. schema version number for the password policy |
allowedNonAlphanumericCharacters[]
|
Output only. Allowed characters which satisfy the non_alphanumeric requirement. |
enforcementState
|
Output only. Which enforcement mode to use for the password policy. |
forceUpgradeOnSignin
|
Users must have a password compliant with the password policy to sign-in. |
Authorization scopes
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/identitytoolkit
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
CustomStrengthOptions
Custom strength options to enforce on user passwords.
JSON representation |
---|
{ "minPasswordLength" : integer , "maxPasswordLength" : integer , "containsLowercaseCharacter" : boolean , "containsUppercaseCharacter" : boolean , "containsNumericCharacter" : boolean , "containsNonAlphanumericCharacter" : boolean } |
Fields | |
---|---|
minPasswordLength
|
Minimum password length. Range from 6 to 30 |
maxPasswordLength
|
Maximum password length. No default max length |
containsLowercaseCharacter
|
The password must contain a lower case character. |
containsUppercaseCharacter
|
The password must contain an upper case character. |
containsNumericCharacter
|
The password must contain a number. |
containsNonAlphanumericCharacter
|
The password must contain a non alpha numeric character. |
EnforcementState
Enforcement state for the password policy
Enums | |
---|---|
ENFORCEMENT_STATE_UNSPECIFIED
|
Enforcement state has not been set. |
OFF
|
Password Policy will not be used on the project. |
ENFORCE
|
Passwords non-compliant with the password policy will be rejected with an error thrown. |