A cloud-based identity and access management service for securing user authentication and resource access
Hello,
Welcome to Microsoft Q&A,
This is expected behavior due to how Azure AD / Entra ID logs and syncs sign-in activity:
- Sign-in logs aren't real-time in Microsoft Graph.
- The lastSignInDateTime or lastSuccessfulSignIn property (available under /beta and /v1.0) is eventually consistent and may take up to 24–72 hours to reflect.
https://learn.microsoft.com/en-us/graph/api/resources/signinactivity?view=graph-rest-1.0#properties
Use Azure Sign-in Logs (via Graph /auditLogs/signIns)
Instead of relying on the cached property (lastSignInDateTime), query the actual sign-in logs:
Connect-MgGraph -Scopes "AuditLog.Read.All"
Get-MgAuditLogSignIn -Filter "userPrincipalName eq '******@domain.com'" -Top 1
- This provides most recent sign-in events and status (success/failure).
- It is closer to real-time (~5-15 minute delay).
Please upvote and accept the answer if it helps!!