Investigating EmailDirection in Microsoft Defender XDR.
The email looked suspicious.
The sender appeared legitimate.
The attachments looked harmless.
But Agent Foskett needed to answer a simple question.
Was the message entering the organisation, leaving the organisation, or moving internally between users?
In Microsoft Defender XDR, EmailDirection helps defenders understand how email travelled through the environment and provides valuable context during phishing, insider threat and compromised mailbox investigations.
Lesson overview
Learn how to investigate email direction and connect inbound, outbound and internal message flow to threat classification, delivery and user exposure evidence.
Why EmailDirection matters
The fields used in this lesson
Step 1 — Review recent email direction values
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
EmailEvents | where Timestamp > ago(30d) | where isnotempty(EmailDirection) | project Timestamp, SenderFromAddress, RecipientEmailAddress, Subject, EmailDirection | order by Timestamp desc
Step 2 — Summarise email direction
- 1
- 2
- 3
- 4
- 5
EmailEvents | where Timestamp > ago(30d) | summarize MessageCount = count() by EmailDirection | order by MessageCount desc
Step 3 — Investigate inbound messages
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
EmailEvents | where Timestamp > ago(30d) | where EmailDirection =~ "Inbound" | project Timestamp, SenderFromAddress, RecipientEmailAddress, Subject, ThreatTypes, DeliveryAction | order by Timestamp desc
Step 4 — Investigate outbound messages
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
EmailEvents | where Timestamp > ago(30d) | where EmailDirection =~ "Outbound" | project Timestamp, SenderFromAddress, RecipientEmailAddress, Subject, ThreatTypes | order by Timestamp desc
Step 5 — Investigate internal mail
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
EmailEvents | where Timestamp > ago(30d) | where EmailDirection =~ "IntraOrg" | project Timestamp, SenderFromAddress, RecipientEmailAddress, Subject | order by Timestamp desc
Step 6 — Compare threats by direction
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
EmailEvents | where Timestamp > ago(30d) | summarize MessageCount = count() by EmailDirection, ThreatTypes | order by MessageCount desc
