- 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 | |
---|---|
tenant |
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 | |
---|---|
custom |
The custom strength options enforced by the password policy. |
schema |
Output only. schema version number for the password policy |
allowed |
Output only. Allowed characters which satisfy the non_alphanumeric requirement. |
enforcement |
Output only. Which enforcement mode to use for the password policy. |
force |
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 | |
---|---|
min |
Minimum password length. Range from 6 to 30 |
max |
Maximum password length. No default max length |
contains |
The password must contain a lower case character. |
contains |
The password must contain an upper case character. |
contains |
The password must contain a number. |
contains |
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. |