Investigating DeviceEvents in Microsoft Defender XDR
DeviceEvents records a wide range of endpoint activity inside Microsoft Defender XDR, including security control actions, device behaviour and other event signals that do not always appear in process, file, registry or network tables.
This table helps defenders understand what happened on a device, investigate ActionType values, and uncover security-relevant activity that may support a wider investigation.
In this lesson, you will learn how to use DeviceEvents to investigate endpoint actions, review security events and identify suspicious device activity.
Lesson overview
Learn how DeviceEvents helps defenders investigate broader endpoint actions and security events that sit around process, file, registry and network telemetry.
Why DeviceEvents matters
Investigation scenario
Step 1 — Review recent DeviceEvents activity
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
DeviceEvents | where Timestamp > ago(7d) | project Timestamp, DeviceName, ActionType, ReportId, InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessAccountName, AdditionalFields | order by Timestamp desc
Step 2 — Discover common ActionType values
- 1
- 2
- 3
- 4
- 5
DeviceEvents | where Timestamp > ago(30d) | summarize Events = count(), Devices = dcount(DeviceName) by ActionType | top 50 by Events desc
Step 3 — Focus on suspicious endpoint actions
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
DeviceEvents | where Timestamp > ago(14d) | where ActionType has_any ("Blocked", "Detected", "Exploit", "Tamper", "Antivirus", "Protection") | project Timestamp, DeviceName, ActionType, InitiatingProcessFileName, InitiatingProcessCommandLine, AdditionalFields | order by Timestamp desc
Step 4 — Investigate one device timeline
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
let TargetDevice = "replace-with-device-name"; DeviceEvents | where Timestamp between (ago(24h) .. now()) | where DeviceName =~ TargetDevice | project Timestamp, ActionType, InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessAccountName, AdditionalFields | order by Timestamp asc
Step 5 — Join DeviceEvents with DeviceInfo
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
let RecentDeviceInfo = DeviceInfo | where Timestamp > ago(30d) | summarize arg_max(Timestamp, *) by DeviceId | project DeviceId, OSPlatform, ExposureLevel, RiskScore; DeviceEvents | where Timestamp > ago(7d) | join kind=leftouter RecentDeviceInfo on DeviceId | project Timestamp, DeviceName, OSPlatform, ExposureLevel, RiskScore, ActionType | order by Timestamp desc
