Get Last Password Change Time Stamp with Graph Powershell

Christopher PTech 61 Reputation points
2022-09-29T15:24:00.083+00:00

I would like to know how I can gather the last password change time stamp for all my azure ad users.
We are cloud only environment and I need to provide a list of soon to expire passwords.
Could this be achieved through Microsoft Graph Powershell? If so, how?

Thank you in advance.

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

Accepted answer
  1. Vasil Michev 119.6K Reputation points MVP Volunteer Moderator
    2022-09-29T17:04:40.373+00:00

    The cmdlet is correct, but you have to specify the properties to return first. The correct property name is LastPasswordChangeDateTime, not LastPasswordChangeTimeStamp. So request it like this:

    Get-MgUser -All -Property DisplayName,lastPasswordChangeDateTime | select DisplayName,lastPasswordChangeDateTime  
    

1 additional answer

Sort by: Most helpful
  1. Christopher PTech 61 Reputation points
    2022-09-29T17:27:52.957+00:00

    Here is what the final result was for me. Thanks again @Vasil Michev

    Get-MgUser -All -Property DisplayName,LastPasswordChangeDateTime |select DisplayName,LastPasswordChangeDateTime| Export-CSV c:\temp\LastPasswordChangeDate.csv -NoTypeInformation

    0 comments No comments

Your answer

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