Skip to main content

entra user password validate

Check a user's password against the organization's password validation policy

Usage

m365 entra user password validate [options]

Alias

m365 aad user password validate [options]

Options

-p, --password <password>

The password to be validated.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

warning

This command is based on an API that is currently in preview and is subject to change once the API reached general availability.

Examples

Validate password cli365P@ssW0rd against the organization's password validation policy

m365 entra user password validate --password "cli365P@ssW0rd"

Response

{
"isValid": true,
"validationResults": [
{
"ruleName": "PasswordMinLength",
"validationPassed": true,
"message": "The new password must have a minimum of 8 characters."
},
{
"ruleName": "PasswordMaxLength",
"validationPassed": true,
"message": "The new password cannot contain more than 256 characters."
},
{
"ruleName": "PasswordComplexity",
"validationPassed": true,
"message": "The new password must contain characters from at least 3 out of: Lowercase characters, Uppercase characters, Numbers, Symbols."
},
{
"ruleName": "PasswordNotBanned",
"validationPassed": true,
"message": "The new password must not be weak or commonly used."
}
]
}
CTRL + M