Last Password Change Time With Account Creation Time
Query
AADSignInEventsBeta
| join kind=leftouter IdentityInfo on AccountUpn
//| where Department contains @"Cyber" or JobTitle contains "architect" //Example of further filtering
| summarize arg_max(LastPasswordChangeTimestamp,*) by AccountUpn, CreatedDateTime //Maximize last password change time
| project AccountUpn, CreatedDateTime, LastPasswordChangeTimestampExplanation
This query is designed to analyze Azure Active Directory sign-in events and associated identity information. Here's a simple breakdown of what it does:
-
Data Source: It starts by looking at the
AADSignInEventsBetatable, which contains sign-in event data. -
Joining Tables: It performs a left outer join with the
IdentityInfotable using theAccountUpn(User Principal Name) as the key. This means it combines data from both tables, keeping all records fromAADSignInEventsBetaand adding matching records fromIdentityInfowhere available. -
Optional Filtering: There's a commented-out line that suggests you could further filter the results to include only those records where the
Departmentcontains "Cyber" or theJobTitlecontains "architect". This line is not currently active in the query. -
Summarizing Data: It summarizes the data by finding the most recent
LastPasswordChangeTimestampfor each user (AccountUpn) andCreatedDateTime. This means it groups the data by user and sign-in event date, and for each group, it selects the record with the latest password change time. -
Selecting Columns: Finally, it projects (selects) only the
AccountUpn,CreatedDateTime, andLastPasswordChangeTimestampcolumns for the output.
In summary, this query retrieves sign-in events and identity information, finds the most recent password change time for each user and sign-in event date, and outputs a simplified list of users with their sign-in event date and last password change time.
Details

Jay Kerai
Released: July 22, 2025
Tables
Keywords
Operators