ovinophile
ovinophile

Reputation: 793

Powershell - Get User's LastPasswordChangeTimestamp using AzureAD Module

Using the MSOnline module (Azure AD v1), I can get a user's last password reset date using

Get-MsolUser -UserPrincipalName $username | fl

And look at the LastPasswordChangeTimestamp property.

Using the AzureAD module (v2), I don't see anything like this property included when using its equivalent Get-AzureADUser

Is there a way to get that timestamp using AzureAD cmdlets?

Upvotes: 1

Views: 1612

Answers (1)

juunas
juunas

Reputation: 58823

The main difference between the v1 and v2 cmdlets is that the v1 cmdlets use the old Azure AD API that uses SOAP, while v2 uses the Graph API, which is RESTful and uses JSON.

Their data models are different and the Graph API currently does not expose that field. So the answer is you cannot get this info using v2 cmdlets.

Upvotes: 3

Related Questions