Detect DMARC Fail Emails in Microsoft Defender
The email looked normal.
The sender looked familiar.
But the authentication data told a different story: DMARC failed.
This Agent Foskett guide shows how to use Microsoft Defender KQL, EmailEvents and AuthenticationDetails to find DMARC failures, check whether the email was delivered, and decide where to pivot next.
Guide summary
This page focuses on one high-value email investigation signal: DMARC failures inside Microsoft Defender XDR.
What you'll learn on this page
Why DMARC fail matters
Start with DMARC failures in EmailEvents
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
EmailEvents | where Timestamp > ago(30d) | where AuthenticationDetails has "dmarc=fail" | project Timestamp, SenderFromAddress, SenderFromDomain, SenderMailFromDomain, RecipientEmailAddress, Subject, DeliveryAction, ThreatTypes, AuthenticationDetails | order by Timestamp desc
- AuthenticationDetails tells you the authentication result recorded by Defender.
- DeliveryAction tells you what happened to the message after evaluation.
- SenderFromDomain and SenderMailFromDomain help you compare what the user sees with the underlying sending path.
π If DMARC failed and the email was delivered, that is where the investigation should start.
Find DMARC fail emails that were delivered
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
EmailEvents | where Timestamp > ago(30d) | where AuthenticationDetails has "dmarc=fail" | where DeliveryAction has "Delivered" | project Timestamp, SenderFromAddress, RecipientEmailAddress, Subject, DeliveryAction, AuthenticationDetails, NetworkMessageId | order by Timestamp desc
Compare visible sender and mail-from domain
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
EmailEvents | where Timestamp > ago(30d) | where AuthenticationDetails has "dmarc=fail" | where SenderFromDomain != SenderMailFromDomain | project Timestamp, SenderFromAddress, SenderFromDomain, SenderMailFromDomain, RecipientEmailAddress, Subject, DeliveryAction, AuthenticationDetails | order by Timestamp desc
- SenderFromDomain is the domain the user is likely to notice.
- SenderMailFromDomain helps reveal the sending path behind the message.
- A mismatch is not always malicious, but it should make sense for that sender and message type.
π The key question is not just βare these different?β It is βdoes this difference make sense?β
Group DMARC failures into patterns
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
EmailEvents | where Timestamp > ago(30d) | where AuthenticationDetails has "dmarc=fail" | summarize MessageCount = count(), RecipientCount = dcount(RecipientEmailAddress), FirstSeen = min(Timestamp), LastSeen = max(Timestamp) by SenderFromAddress, SenderFromDomain, Subject, DeliveryAction | where MessageCount >= 3 | order by MessageCount desc
Pivot from DMARC fail to URL clicks
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
let DMARCFailMessages = EmailEvents | where Timestamp > ago(30d) | where AuthenticationDetails has "dmarc=fail" | project NetworkMessageId, EmailTime = Timestamp, SenderFromAddress, RecipientEmailAddress, Subject; DMARCFailMessages | join kind=inner ( UrlClickEvents | where Timestamp > ago(30d) | project NetworkMessageId, ClickTime = Timestamp, AccountUpn, Url, ActionType ) on NetworkMessageId | order by ClickTime desc
- NetworkMessageId connects the email event to click telemetry.
- ActionType helps show whether the click was allowed, blocked or scanned.
- The clicked URL, account and timestamp become the starting point for identity and endpoint pivots.
π A DMARC fail email becomes more urgent when a user clicked the link.
Agent Foskett investigation checklist
Delivered DMARC failure decision path
Related Agent Foskett investigations
Learn the KQL behind this page
Frequently asked questions
Use the EmailEvents table and filter AuthenticationDetails for dmarc=fail. Then project sender, recipient, subject, DeliveryAction and NetworkMessageId so you can decide what to investigate next.
Delivered DMARC failures may have reached users. That makes them higher priority than messages that were already blocked, quarantined or junked before user exposure.
No. It may be spoofing, forwarding, a third-party sender alignment issue or a misconfiguration. The analyst needs to review delivery action, sender alignment, message content, recipient spread and user clicks.
Use NetworkMessageId to join EmailEvents with UrlClickEvents. Then review AccountUpn, Url, ActionType and ClickTime to see whether a user interacted with the message.
Continue hunting
AuthenticationDetails explains whether SPF, DKIM and DMARC actually aligned β and why an email may still have been delivered.
Understand authentication signals β
Open EmailEvents guide β
Review spoofing guide β
Open KQL hub β
Review Microsoft Defender services β
Develop IT. Protect IT. GEMXIT PTY LTD | GEMXIT UK LTD
