Retrieve the Password Validation Rules API

On this page
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

Path Parameters#

tenantId
  • Type: UUID
  • Required

The Id of the tenant.

Request Headers#

X-FusionAuth-TenantId
  • Type: 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 other values in the request 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

Code Description
200 The request was successful. The response will contain a JSON body.
500 There 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
  • Type: Boolean

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

tenant.passwordValidationRules.maxLength
  • Type: Integer

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

tenant.passwordValidationRules.minLength
  • Type: Integer

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

tenant.passwordValidationRules.rememberPreviousPasswords.count
  • Type: Integer

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

tenant.passwordValidationRules.rememberPreviousPasswords.enabled
  • Type: Boolean

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

tenant.passwordValidationRules.requireMixedCase
  • Type: Boolean

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

tenant.passwordValidationRules.requireNonAlpha
  • Type: Boolean

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

tenant.passwordValidationRules.requireNumber
  • Type: 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
  }
}