Graph API - Password protection & password expiration policy

K Roja 51 Reputation points

Hello Team,

Do we have graph api for password protection & password expiration policy.
Please find below the screenshots.

Password protection - (Need to automate all the properties of password protection using graph api)

Password expiration policy - (Need to automate the days of expiry using graph api in

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,525 questions
{count} votes

2 answers

Sort by: Most helpful
  1. 2022-10-11T20:10:13.813+00:00

    Hello @K Roja and thanks for reaching out. Azure AD password protection cannot be managed trough MS Graph. Azure AD password expiration policy can be managed through MSOL Get-MsolPasswordPolicy and Set-MsolPasswordPolicy cmdlets.

    Alternately and for Password protection you might use the Azure AD Portal backed. Please keep in mind this API is not publicly supported and can change in the future w/o notice. You can use az cli to get an access token:

       az account get-access-token --resource 74658136-14ec-4630-ad9b-26e160ff0fc6  
         "lockoutThreshold": 10,  
         "lockoutDurationInSeconds": 60,  
         "enforceCustomBannedPasswords": false,  
         "customBannedPasswords": [],  
         "enableBannedPasswordCheckOnPremises": true,  
         "bannedPasswordCheckOnPremisesMode": 1  

    Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.

  2. Joseph de Heer 1 Reputation point

    Any update on this? Since we moved from DAP to GDAP, the MSOL cmdlets no longer work with the -TenantID parameter, so we can't read the password expiration policy anymore.

    0 comments No comments