🤖 For AI agents: The complete documentation index is available at /docs/llms.txt. A markdown version of this page is available at /docs/apis/tenants/retrieve-the-password-validation-rules.md.

Retrieve the Password Validation Rules

version

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#

tenantId UUID required

The Id of the tenant.

Request Headers#

X-FusionAuth-TenantId String optional

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.disallowUserLoginId Boolean

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

tenant.passwordValidationRules.maxLength Integer

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

tenant.passwordValidationRules.minLength Integer

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

tenant.passwordValidationRules.rememberPreviousPasswords.count Integer

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

tenant.passwordValidationRules.rememberPreviousPasswords.enabled Boolean

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

tenant.passwordValidationRules.requireMixedCase Boolean

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

tenant.passwordValidationRules.requireNonAlpha Boolean

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

tenant.passwordValidationRules.requireNumber Boolean

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
  }
}