> For AI agents: [llms.txt](https://docs.trustedauth.com/llms.txt) provides a Markdown index of this documentation.

# Validate user password

`POST /api/web/v1/users/{userid}/password/validate`

Validate user password. Caller requires the USERPASSWORDS:EDIT permission.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| userid | path | Yes | string | The UUID of the user whose password is to be validated. |

## Request Body

Required.

### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "ignorePasswordHistory": {
      "type": "boolean",
      "description": "If set to true, existing password history is ignored."
    },
    "namedPasswordId": {
      "type": "string",
      "description": "The ID of the named password."
    },
    "password": {
      "type": "string",
      "description": "New password value that needs to be validated. ",
      "example": "newPassword123!"
    }
  },
  "description": "UserPasswordValidationParms",
  "title": "UserPasswordValidationParms"
}
```

## Responses

### 200

Successful

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "adComplexity": {
      "type": "boolean",
      "description": "True if password meets the active directory complexity requirements."
    },
    "alias": {
      "type": "boolean",
      "description": "True if password meets the userId requirements. Password must not contain user alias."
    },
    "alphaNumeric": {
      "type": "boolean",
      "description": "True if password meets the alpha numeric requirements."
    },
    "blacklisted": {
      "type": "boolean",
      "description": "True if password does not contain a blacklisted password."
    },
    "directoryType": {
      "type": "string",
      "description": "Type of the directory the user is associated with, ON_PREM, AZURE or AD Connector.",
      "enum": [
        "ON_PREM",
        "AZURE",
        "AD_CONNECTOR"
      ]
    },
    "fullName": {
      "type": "boolean",
      "description": "True if password meets the full name requirements. Full Name must not be in the password."
    },
    "length": {
      "type": "boolean",
      "description": "True if password meets the length requirements."
    },
    "lowerCase": {
      "type": "boolean",
      "description": "True if password meets the lower case requirements."
    },
    "nondeterministicValidations": {
      "type": "array",
      "description": "List of validations that cannot be determined mostly due to user is AD managed.",
      "items": {
        "type": "string",
        "description": "List of validations that cannot be determined mostly due to user is AD managed."
      }
    },
    "numeric": {
      "type": "boolean",
      "description": "True if password meets the numeric requirements."
    },
    "passwordHistory": {
      "type": "boolean",
      "description": "True if password does not match the history if enabled."
    },
    "repeatedCharacters": {
      "type": "boolean",
      "description": "True if password meets the repeated characters requirements."
    },
    "strength": {
      "type": "boolean",
      "description": "True if password meets the minimum strength requirements."
    },
    "upperCase": {
      "type": "boolean",
      "description": "True if password meets the upper case requirements."
    },
    "userID": {
      "type": "boolean",
      "description": "True if password meets the userId requirements. Password must not contain userId."
    },
    "userPasswordStrength": {
      "type": "object",
      "properties": {
        "score": {
          "type": "integer",
          "description": "Evaluated password strength score. <br><br> 0:very weak | 1:weak | 2:average | 3:good | 4:strong",
          "format": "int32",
          "example": 3
        },
        "suggestions": {
          "type": "array",
          "description": "Suggestions on how the password strength can be improved.",
          "example": "feedback.dictionary.suggestions.allUppercase",
          "items": {
            "type": "string",
            "description": "Suggestions on how the password strength can be improved.",
            "example": "feedback.dictionary.suggestions.allUppercase"
          }
        }
      },
      "description": "UserPasswordStrength",
      "title": "UserPasswordStrength"
    }
  },
  "description": "UserPasswordValidationResponse",
  "title": "UserPasswordValidationResponse"
}
```

### 400

Bad Request

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 401

Access denied

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 403

Forbidden

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 404

Not Found

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 409

Conflict

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

## Security

Requirements

```json
[
  {
    "AdminAPIAuthentication": [
      "USERPASSWORDS:EDIT"
    ]
  }
]
```
