PasswordLastChanged or PwdLastSet

Senior Member

I'm trying to get the fields PasswordLastChanged or PwdLastSet so i can notify my users when they have to change their password but i dont know how to get that fields

3 Replies

@Ooster1 

 

You can use powershell command Get-MsolUser from Azure AD v1 module to get PwdLastSet value.

 

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

The LastPasswordChangeTimeStamp field is still not supported in latest Azure AD v2 module (Get-AzureADUser) and its base service Graph Api.

 

You can refer below post for more info.

https://www.morgantechspace.com/2019/05/how-to-get-password-last-set-time-for-office-365-users.html

@Ooster1 

 

I found below script. This might help you.

https://o365reports.com/2020/02/17/export-office-365-users-last-password-change-date-to-csv/

 

This script allows you to generate 7 different password reports.
- Pwd Last Change Date Report
- Pwd Expiry Date Report
- Pwd Expired Users Report
- Pwd Never Expires Users Report
- Soon-to-Expire Pwd Users Report
- Recently Pwd Changed Users Report
- Password Report for Licensed Users

In Case of an Azure AD User, if you'd like to find the Last Password Change Date-Time stamp, you can use the below PS cmdlet:

$user=Get-MsolUser -UserPrincipalName Email address removed
$user.LastPasswordChangeTimestamp