I tried to create a HTTP request to https://graph.microsoft.com/v1.0/users/ to get the PasswordLastChanged of PwdLastSet field from a AD user so I can send an email when it almost expires but the HTTP request doesnt give me that fields. Anyone an idea?
First, you should likely insure that all of the Prerequisites for connecting to The Microsoft Graph Security connector have been met. You should also notice that there are no password definitions available with the connector itself. Also, a quick search of the Graph API documentation and the Microsoft Graph beta endpoint reference each show no instance or mention of the PasswordLastChanged definition.
The Azure AD Connector, and it's corresponding Azure AD Graph API Documentation do have some password capabilities - as defined by the Azure AD Graph API reference. I believe what you are seeking can be found within the Operations on Users section of the reference, specifically the Other navigation properties section which references the User Entity.
This again has many mentions of password related items, but nothing specifically for PasswordLastChanged. If this is functionality you would like to see added to Flow or a Flow Template, please consider submitting it to the Flow Ideas page, where it can be voted on by other users, and tracked and commented on by the Flow team.
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
This can actually be done with a Microsoft Graph HTTP request. You have to set up an application in your AAD portal using these instructions and then set your HTTP request to use OAuth to access the app. The users entity has a property called lastPasswordChangeDateTime that isn't included in the normal get user action but can be accessed using the URI below. The Authority and Audience are always the same.
The only catch is that HTTP is now a Premium action. If anyone can figure out how to get around that, I'd be much obliged!
This works with MS Graph Beta. Just do a Get https://graph.microsoft.com/beta/users/{email-address}?$select=lastPasswordChangeDateTime
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
If you are a small business ISV/Reseller, share your thoughts with our research team.
User | Count |
---|---|
26 | |
25 | |
23 | |
22 | |
14 |
User | Count |
---|---|
45 | |
33 | |
33 | |
32 | |
30 |