AD user Last Password Change

Handian Sudianto 6,621 Reputation points
2023-01-09T06:40:40.647+00:00

HI..

I want to get user AD users last password change, currently i use this command to query the users.
"Connect-MgGraph -Scopes User.ReadBasic.All
Get-MgUser -Select id,userPrincipalName,lastPasswordChangeDateTime -All | select id,userPrincipalName,lastPasswordChangeDateTime"

But that command not have result if administrator change the user password, so maybe someone here can help me to get the last password changed even the password changed by administrator or by the user it self.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Shweta Mathur 30,431 Reputation points Microsoft Employee Moderator
    2023-01-09T07:03:21.067+00:00

    Hi @Handian Sudianto ,

    Thanks for reaching out.

    You can use the below command to check when the password has been updated for the users:

    Get-MsolUser -All | Select DisplayName,UserPrincipalName,LastPasswordChangeTimeStamp

    Before this, make sure to install and connect to Msol.
    277371-image.png

    Hope this will help.

    Thanks,
    Shweta


    Please remember to "Accept Answer" if answer helped you.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.