Api's to get Password Policy in Azure AD

3.8k Views Asked by At

I need API's to get Password Policy of Azure Active Directory with help of domain name or with users mailId

1

There are 1 best solutions below

5
unknown On BEST ANSWER

There are Azure AD password policies from this link. And it is used for Azure AD user, but not external users.

There is no method about both Microsoft Graph and Azure AD Graph API for external users.

For more details, see Azure AD Graph API and Microsoft Graph.


Is there any API's to get Password Policy for Azure AD user.

You could use Microsoft Graph:

GET https://graph.microsoft.com/beta/users/{userPrincipalName}?$select=displayName,passwordPolicies

The result will look like this:

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#users(displayName,passwordPolicies)/$entity",
    "displayName": "xxxxxx",
    "passwordPolicies": "DisablePasswordExpiration"
}

You can find details about this property here.

enter image description here

There is another way to use Get-MsolPasswordPolicy by Powershell.