Investigate Suspicious Email in Microsoft 365 with KQL
A suspicious email does not always announce itself. Sometimes the branding looks right, the sender looks familiar and the subject feels normal. But email trust should never be judged by appearance alone. This page shows how GEMXIT uses KQL in Microsoft Defender XDR to investigate whether a message was genuinely authenticated, poorly aligned, impersonated, or delivered despite warning signs. It supports stronger identity and access controls and practical security operations.
Investigation summary
This page is written as an investigation guide. It uses EmailEvents, AuthenticationDetails, sender alignment and delivery context to help decide whether a suspicious email was genuinely trusted or simply convincing enough to get through.
What you'll learn on this page
What this investigation page helps you answer
Start with authentication evidence
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
EmailEvents | where Timestamp > ago(14d) | where AuthenticationDetails has_any ("spf=fail", "dkim=fail", "dmarc=fail") | project Timestamp, SenderFromAddress, SenderFromDomain, SenderMailFromAddress, SenderMailFromDomain, RecipientEmailAddress, Subject, AuthenticationDetails, ThreatTypes, DeliveryAction | order by Timestamp desc
Validate visible sender against envelope sender
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
EmailEvents | where Timestamp > ago(14d) | where SenderFromDomain != SenderMailFromDomain | project Timestamp, SenderFromAddress, SenderFromDomain, SenderMailFromAddress, SenderMailFromDomain, RecipientEmailAddress, Subject, AuthenticationDetails | order by Timestamp desc
Investigate emails pretending to be internal
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
let TargetDomain = "yourdomain.com"; EmailEvents | where Timestamp > ago(14d) | where SenderFromDomain =~ TargetDomain | where RecipientEmailAddress endswith TargetDomain | where SenderFromAddress =~ RecipientEmailAddress or AuthenticationDetails has_any ("spf=fail", "dkim=fail", "dmarc=fail") | project Timestamp, SenderFromAddress, RecipientEmailAddress, Subject, AuthenticationDetails, DeliveryAction, UrlCount | order by Timestamp desc
Cluster suspicious messages into campaigns
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
EmailEvents | where Timestamp > ago(14d) | where AuthenticationDetails has_any ("spf=fail", "dkim=fail", "dmarc=fail") | summarize MessageCount = count(), RecipientCount = dcount(RecipientEmailAddress) by SenderFromAddress, SenderFromDomain, Subject | where MessageCount >= 3 | order by MessageCount desc
Follow the trail after delivery
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
let SuspiciousMessages = EmailEvents | where Timestamp > ago(14d) | where AuthenticationDetails has_any ("spf=fail", "dkim=fail", "dmarc=fail") | project NetworkMessageId, Timestamp, SenderFromAddress, RecipientEmailAddress, Subject; SuspiciousMessages | join kind=inner ( UrlClickEvents | where Timestamp > ago(14d) | project NetworkMessageId, ClickTime = Timestamp, AccountUpn, Url, ActionType ) on NetworkMessageId | order by ClickTime desc
What a good suspicious email investigation includes
This investigation shows how a simple email can lead to wallet access and user-approved compromise.
Related Agent Foskett email investigations
Learn the KQL fundamentals behind this investigation
Frequently asked questions
Start with Microsoft Defender XDR EmailEvents, review AuthenticationDetails for SPF, DKIM and DMARC results, compare SenderFromDomain with SenderMailFromDomain, then check delivery action, recipient targeting and UrlClickEvents.
EmailEvents is usually the starting point for Microsoft Defender XDR email investigations. UrlClickEvents, IdentityLogonEvents, DeviceProcessEvents and CloudAppEvents can then help validate click activity, identity behaviour and endpoint impact.
No. A DMARC failure is an important signal, but it needs context. Analysts should review sender alignment, delivery outcome, recipient targeting, message content and any user interaction before deciding impact.
The visible sender is what the user sees, while the Mail From path helps show the underlying sending route. A mismatch may be normal for third-party services, but it should be validated when investigating suspicious mail.
Final Agent Foskett thought
If you want help improving Microsoft email visibility, hunting, and operational response, 👉 review Microsoft security operations
Develop IT. Protect IT. GEMXIT PTY LTD | GEMXIT UK LTD