entra user password validate
Check a user's password against the organization's password validation policy
Usage
m365 entra 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,permissions,response,full. Default isoptions.--query [query]JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]Output type.
json,text,csv,md,none. Defaultjson.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Remarks
This command is based on an API that is currently in preview and is subject to change once the API reached general availability.
Permissions
- Delegated
| Resource | Permissions |
|---|---|
| Microsoft Graph | User.ReadWrite |
Examples
Validate password cli365P@ssW0rd against the organization's password validation policy.
m365 entra user password validate --password "cli365P@ssW0rd"
Response
- JSON
- Text
- CSV
- Markdown
{
"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."
}
]
}
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."}]
isValid
1
# entra user password validate --password "cli365P@ssW0rd"
Date: 2023-06-02
Property | Value
---------|-------
isValid | true