Investigating IdentityLogonEvents in Microsoft Defender XDR
IdentityLogonEvents records authentication activity associated with accounts and devices protected by Microsoft Defender XDR and Microsoft Defender for Identity.
This table helps defenders investigate successful logons, failed logons, account access patterns, source IP addresses, protocols, destination devices and suspicious authentication behaviour.
In this lesson, you will learn how to use IdentityLogonEvents to follow identity evidence, review logon activity and support Microsoft Defender XDR investigations.
Lesson overview
Learn how IdentityLogonEvents helps defenders investigate authentication activity, suspicious account access and identity-based attack patterns.
Why IdentityLogonEvents matters
Investigation scenario
Step 1 — Review recent identity logons
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
IdentityLogonEvents | where Timestamp > ago(7d) | project Timestamp, ActionType, AccountName, AccountDomain, DeviceName, LogonType, Protocol, IPAddress, FailureReason | order by Timestamp desc
Step 2 — Focus on one account
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
IdentityLogonEvents | where Timestamp > ago(14d) | where AccountName =~ "rebecca" | project Timestamp, ActionType, AccountName, DeviceName, IPAddress, LogonType, Protocol, FailureReason | order by Timestamp asc
Step 3 — Identify repeated failures
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
IdentityLogonEvents | where Timestamp > ago(24h) | where ActionType has "LogonFailed" | summarize FailedAttempts = count() by AccountName, IPAddress, DeviceName, FailureReason | order by FailedAttempts desc
Step 4 — Review successful logons after failures
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
IdentityLogonEvents | where Timestamp > ago(7d) | where ActionType has_any ("LogonSuccess", "LogonFailed") | project Timestamp, ActionType, AccountName, DeviceName, IPAddress, LogonType, Protocol | order by AccountName asc, Timestamp asc
Step 5 — Summarise by account and source IP
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
IdentityLogonEvents | where Timestamp > ago(7d) | summarize LogonEvents = count(), FirstSeen = min(Timestamp), LastSeen = max(Timestamp) by AccountName, IPAddress, LogonType | order by LogonEvents desc
Step 6 — Correlate with endpoint activity
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
let SuspiciousDevice = "WORKSTATION-07"; DeviceProcessEvents | where Timestamp > ago(24h) | where DeviceName =~ SuspiciousDevice | project Timestamp, DeviceName, FileName, ProcessCommandLine, InitiatingProcessFileName, AccountName | order by Timestamp asc
