Investigating NetworkMessageId in Microsoft Defender XDR.
One email can appear in many places.
EmailEvents records the message.
EmailUrlInfo extracts the links.
UrlClickEvents records the click.
EmailAttachmentInfo records the files.
NetworkMessageId connects the evidence.
Lesson overview
Learn how NetworkMessageId helps defenders follow the same email across Microsoft Defender XDR tables and build a connected email investigation.
Why NetworkMessageId matters
Investigation scenario
Step 1 — Start with EmailEvents
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
EmailEvents | where Timestamp > ago(30d) | where Subject has "Invoice" | project Timestamp, NetworkMessageId, SenderFromAddress, RecipientEmailAddress, Subject, DeliveryAction | order by Timestamp desc
Step 2 — Reuse the message identifier
- 1
- 2
- 3
- 4
- 5
- 6
- 7
let MessageId = "<paste NetworkMessageId here>"; EmailEvents | where NetworkMessageId == MessageId | project Timestamp, SenderFromAddress, RecipientEmailAddress, Subject, DeliveryAction
Step 3 — Pivot into EmailUrlInfo
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
let MessageId = "<paste NetworkMessageId here>"; EmailUrlInfo | where NetworkMessageId == MessageId | project Timestamp, NetworkMessageId, Url, UrlDomain, UrlLocation | order by Timestamp asc
Step 4 — Pivot into UrlClickEvents
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
let MessageId = "<paste NetworkMessageId here>"; UrlClickEvents | where NetworkMessageId == MessageId | project Timestamp, AccountUpn, Url, ActionType, Workload, IPAddress | order by Timestamp asc
Step 5 — Pivot into EmailAttachmentInfo
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
let MessageId = "<paste NetworkMessageId here>"; EmailAttachmentInfo | where NetworkMessageId == MessageId | project Timestamp, NetworkMessageId, FileName, FileType, SHA256, RecipientEmailAddress | order by Timestamp asc
Step 6 — Join message and click evidence
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
EmailEvents | where Timestamp > ago(30d) | where ThreatTypes has "Phish" | join kind=leftouter ( UrlClickEvents | where Timestamp > ago(30d) | project NetworkMessageId, ClickTime = Timestamp, AccountUpn, Url, ActionType ) on NetworkMessageId | project Timestamp, SenderFromAddress, RecipientEmailAddress, Subject, DeliveryAction, ClickTime, AccountUpn, Url, ActionType | order by Timestamp desc
