Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
1 like 0 dislike
2k views
in Azure by 16 24 32
Is there any PowerShell command that can help me know when the last time the user changed his password in Azure Active Directory using PowerShell?

1 Answer

2 like 0 dislike
by 82 148 312
selected by
 
Best answer

How to get the last time the user changed his password in AzureAD using PowerShell?

In Azure Active Directory, There is a PowerShell cmdlet called Get-MsolUser that is used to get the user's details from Azure Active Directory.

1) Get the last password change time for a specific user in AzureAD using PowerShell

The below cmdlet, lets you get the last time password change for a specific user using PrincipalName

Get-MsolUser -UserPrincipalName "debug@debuto.onmicrosoft.com" | Select-Object DisplayName, LastPasswordChangeTimeStamp

2) Get the last password change time for all users in AzureAD using PowerShell

The below cmdlet gets the last password change time up to 2000 enabled users.

Get-MsolUser  -EnabledFilter EnabledOnly -MaxResults 2000 |  DisplayName, UserPrincipalName, LastPasswordChangeTimeStamp 

Read more at Get-MsolUser

If you don’t ask, the answer is always NO!
...