SenderFrom vs SenderMailFrom Explained
The email looked legitimate. The sender name looked familiar. The visible From address matched what the user expected.
But the mail system told a different story.
In Microsoft Defender EmailEvents, SenderFrom is the sender identity the user sees. SenderMailFrom is the envelope sender used during mail delivery. When those values do not align, the result may be normal platform behaviour — or it may be a spoofing signal worth investigating.
This Agent Foskett guide shows how to compare SenderFromAddress, SenderFromDomain, SenderMailFromAddress and SenderMailFromDomain using KQL, and how to decide whether the mismatch is expected, suspicious or part of a broader email attack.
The goal is simple: stop trusting the visible sender without checking the delivery evidence.
Sender alignment summary
A practical Microsoft Defender guide for understanding visible sender identity, envelope sender identity, domain mismatch, DMARC alignment and spoofing indicators in EmailEvents.
What these fields mean
Baseline query: compare SenderFrom and SenderMailFrom
- 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,
DeliveryAction,
NetworkMessageId
| order by Timestamp descQuery: find sender domain mismatch
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 19
EmailEvents
| where Timestamp > ago(30d)
| where SenderFromDomain != SenderMailFromDomain
| project
Timestamp,
SenderFromAddress,
SenderFromDomain,
SenderMailFromAddress,
SenderMailFromDomain,
RecipientEmailAddress,
Subject,
AuthenticationDetails,
DeliveryAction
| order by Timestamp descQuery: sender mismatch plus DMARC failure
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
EmailEvents
| where Timestamp > ago(30d)
| where SenderFromDomain != SenderMailFromDomain
| where AuthenticationDetails has_any ("dmarc=fail", "spf=fail", "dkim=fail", "spoof")
| project
Timestamp,
SenderFromAddress,
SenderFromDomain,
SenderMailFromAddress,
SenderMailFromDomain,
RecipientEmailAddress,
Subject,
AuthenticationDetails,
DeliveryAction,
NetworkMessageId
| order by Timestamp descQuery: group mismatched sender patterns
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
EmailEvents
| where Timestamp > ago(30d)
| where SenderFromDomain != SenderMailFromDomain
| summarize
MessageCount = count(),
RecipientCount = dcount(RecipientEmailAddress),
FirstSeen = min(Timestamp),
LastSeen = max(Timestamp)
by SenderFromDomain, SenderMailFromDomain, SenderFromAddress, Subject, DeliveryAction
| where MessageCount >= 3
| order by MessageCount descInvestigation checklist
Understand authentication →
Review delivered failures →
Review click investigation →
Continue your investigation
Open EmailEvents guide →
Open spoofing guide →
Open KQL hub →
