EmailEvents KQL Guide for Microsoft Defender
This page is built as a practical guide to reading EmailEvents in Microsoft Defender XDR.
It is not just about copying a query. It is about understanding what the email data is telling you: who the message claimed to be from, how it was authenticated, whether it was delivered, and where to pivot next.
Use this guide when you need to analyse suspicious email, sender mismatch, spoofing indicators, AuthenticationDetails, DMARC failures and delivery outcomes across your Microsoft 365 environment.
The goal is simple: move from “this email looks suspicious” to evidence you can explain, investigate and act on.
EmailEvents guide summary
A practical Microsoft Defender guide for analysts and administrators who want to understand EmailEvents, sender fields, AuthenticationDetails, delivery actions and investigation pivots.
What EmailEvents actually tells you
Baseline query: start with the EmailEvents story
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
EmailEvents
| where Timestamp > ago(30d)
| project
Timestamp,
SenderFromAddress,
SenderFromDomain,
SenderMailFromAddress,
SenderMailFromDomain,
RecipientEmailAddress,
Subject,
AuthenticationDetails,
ThreatTypes,
DeliveryAction,
NetworkMessageId
| order by Timestamp desc
Query: EmailEvents with authentication failures
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
EmailEvents
| where Timestamp > ago(30d)
| where AuthenticationDetails has_any ("spf=fail", "dkim=fail", "dmarc=fail", "spoof")
| project
Timestamp,
SenderFromAddress,
SenderFromDomain,
SenderMailFromAddress,
SenderMailFromDomain,
RecipientEmailAddress,
Subject,
AuthenticationDetails,
DeliveryAction,
NetworkMessageId
| order by Timestamp descQuery: sender alignment in EmailEvents
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
EmailEvents
| where Timestamp > ago(30d)
| where SenderFromDomain != SenderMailFromDomain
| project
Timestamp,
SenderFromAddress,
SenderFromDomain,
SenderMailFromAddress,
SenderMailFromDomain,
RecipientEmailAddress,
Subject,
AuthenticationDetails,
DeliveryAction
| order by Timestamp descQuery: delivered messages with suspicious authentication
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
EmailEvents
| where Timestamp > ago(30d)
| where AuthenticationDetails has_any ("spf=fail", "dkim=fail", "dmarc=fail", "spoof")
| where DeliveryAction has_any ("Delivered", "Allowed", "Junked")
| project
Timestamp,
SenderFromAddress,
SenderFromDomain,
RecipientEmailAddress,
Subject,
AuthenticationDetails,
ThreatTypes,
DeliveryAction,
NetworkMessageId
| order by Timestamp descQuery: EmailEvents campaign summary
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
EmailEvents
| where Timestamp > ago(30d)
| summarize
MessageCount = count(),
RecipientCount = dcount(RecipientEmailAddress),
FirstSeen = min(Timestamp),
LastSeen = max(Timestamp)
by SenderFromAddress, SenderFromDomain, Subject, DeliveryAction
| where MessageCount >= 3
| order by MessageCount descQuery: pivot from EmailEvents to UrlClickEvents
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
let DeliveredMessages =
EmailEvents
| where Timestamp > ago(30d)
| where DeliveryAction has_any ("Delivered", "Allowed", "Junked")
| project NetworkMessageId, EmailTime = Timestamp, SenderFromAddress, RecipientEmailAddress, Subject;
DeliveredMessages
| join kind=inner (
UrlClickEvents
| where Timestamp > ago(30d)
| project NetworkMessageId, ClickTime = Timestamp, AccountUpn, Url, ActionType
) on NetworkMessageId
| order by ClickTime descContinue your investigation
Open spoofing guide →
Review DMARC failures →
Open the KQL hub →
