Retrieve the Password Validation Rules

This API has been available since 1.8.0

This API is used to retrieve the Password Validation Rules. This configuration is a subset of the Tenant configuration.

Request#

No Authentication Required
Retrieve the Password Validation Rules
GET/api/tenant/password-validation-rules/{tenantId}
OpenAPI Spec

Request Parameters#

tenantIdUUIDrequired

The Id of the tenant.

Request Headers#

X-FusionAuth-TenantIdStringoptional

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See Making an API request using a Tenant Id for additional information.

Response#

The response for this API contains the Password Validation Rules.

Response Codes

CodeDescription
200The request was successful. The response will contain a JSON body.
500There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty.

Response Body#

tenant.passwordValidationRules.disallowUserLoginIdBoolean

Indicates that passwords containing the user's login Id will not be allowed.

tenant.passwordValidationRules.maxLengthInteger

The maximum number of characters that are allowed for user passwords.

tenant.passwordValidationRules.minLengthInteger

The minimum number of characters that are required for user passwords.

tenant.passwordValidationRules.rememberPreviousPasswords.countInteger

The number of previous passwords that should be remembered so they are not re-used by the User.

tenant.passwordValidationRules.rememberPreviousPasswords.enabledBoolean

Indicates that the remember previous password validation is enabled and being enforced.

tenant.passwordValidationRules.requireMixedCaseBoolean

Indicates that passwords require an uppercase and lowercase character to be valid.

tenant.passwordValidationRules.requireNonAlphaBoolean

Indicates that passwords require a non-alphanumeric character to be valid.

tenant.passwordValidationRules.requireNumberBoolean

Indicates that passwords require at least one number to be valid.

Example Response JSON

{
  "passwordValidationRules": {
    "maxLength": 256,
    "minLength": 8,
    "rememberPreviousPasswords": {
      "count": 2,
      "enabled": true
    },
    "requireMixedCase": true,
    "requireNonAlpha": true,
    "requireNumber": true
  }
}