AD vs Entra ID: Which Last Sign-In attribute should you trust?
Overview
Have you ever been asked by an auditor, manager, or security team a seemingly simple question:
These are common questions for identity and security administrators, yet the answer is often misunderstood.
Active Directory and Microsoft Entra ID track user activity using different attributes, update mechanisms, and replication behaviors. As a result, the answer is often more complex than simply checking a single attribute.
Understanding these differences is essential for making informed operational, security, and audit-related decisions. This article explores the most commonly used sign-in attributes, explains their strengths and limitations, and presents a practical approach for accurately identifying user activity across hybrid identity environments.
Why This Matters
Accurate sign-in information impacts security investigations, account lifecycle management, licensing optimization, and compliance initiatives.

Real-World Scenario
A group of contractor accounts was incorrectly classified as inactive and disabled after an access review relied solely on Active Directory sign-in data. The subsequent investigation revealed that the users were actively accessing cloud-only resources through Microsoft Entra ID.
This example highlights how relying on a single attribute or identity source can lead to incorrect conclusions and unnecessary business disruption.

Key Concepts
In a hybrid identity environment, user activity may occur both on-premises and in the cloud.

Because each platform records activity differently, a single attribute rarely provides the complete picture.
Understanding Active Directory Sign-In Attributes
| Attribute | Replicated | Description | Best Use Case |
|---|---|---|---|
| LastLogon | No | Updated only on the Domain Controller that authenticated the user. This attribute is not replicated between Domain Controllers. To determine the actual last logon, every Domain Controller must be queried and compared. | Security investigations and accurate logon analysis |
| LastLogonTimestamp | Yes | Replicated version of LastLogon. Primarily designed to identify stale accounts. Updated according to the domain attribute ms-DS-Logon-Time-Sync-Interval, which defaults to approximately 14 days when not configured. | Inactive account reporting |
| LastLogonDate | Calculated | Human-readable PowerShell conversion of LastLogonTimestamp. It is not a native Active Directory attribute and is not replicated. Instead, it is calculated locally from the replicated LastLogonTimestamp value. | Administrative reporting and quick searches |
Understanding Microsoft Entra ID Sign-In Attributes
| Attribute | Description | Best Use Case |
|---|---|---|
| LastSignInDateTime | Timestamp of the last interactive sign-in attempt. The sign-in may be successful or unsuccessful (for example, a failed MFA challenge). | Authentication troubleshooting |
| LastSuccessfulSignInDateTime | Timestamp of the last successful sign-in, including both interactive and non-interactive authentication events. | Most accurate indicator of cloud account activity |
| LastNonInteractiveSignInDateTime | Timestamp of the last non-interactive sign-in attempt. The sign-in may be successful or unsuccessful and is typically generated by applications or services acting on behalf of the user. | Identifying application-based activity and supporting inactive account analysis. |
LastLogonDate and LastSignInDateTime are frequently used by administrators, but they do not always represent the most accurate indication of user activity.
Common Pitfalls
| Common Mistake | Impact |
|---|---|
| Using LastLogonDate as the sole source of truth. | Cloud-only activity may be missed. |
| Assuming LastSignInDateTime always represents successful activity. | Failed authentication attempts may lead to incorrect conclusions. |
| Evaluating only Active Directory data. | Active cloud users may be incorrectly classified as inactive. |
Recommended Approach
The workflow below provides the most accurate method for determining user activity in hybrid identity environments.

Compare LastLogon from all Domain Controllers with LastSuccessfulSignInDateTime from Microsoft Entra ID.
PowerShell Example
The following HTML report was generated using the Hybrid_LastKnownActivity_Report.ps1 PowerShell script, which is available for download on GitHub.

Final Thoughts
Determining a user’s last activity is more complex than reviewing a single attribute.
While Active Directory and Microsoft Entra ID both provide valuable sign-in information, each platform records and maintains activity differently.
Microsoft identifies LastLogon as the most accurate on-premises logon attribute and LastSuccessfulSignInDateTime as the most reliable indicator of successful cloud activity.
In hybrid environments, correlating both data sources can help administrators build a more complete view of user activity and make more informed operational and security decisions.
If you found this content useful, feel free to share your thoughts on LinkedIn and share this article with others who may benefit from it.
References
Microsoft. signInActivity resource type. Microsoft Learn. Available at: https://learn.microsoft.com/en-us/graph/api/resources/signinactivity?view=graph-rest-1.0
Microsoft. Understanding the AD Account Attributes – LastLogon, LastLogonTimeStamp and LastLogonDate. Microsoft TechNet Wiki. Available at: https://learn.microsoft.com/en-us/archive/technet-wiki/22461.understanding-the-ad-account-attributes-lastlogon-lastlogontimestamp-and-lastlogondate
