Confirm the collaboration lure
The collaboration event anchors the social-engineering phase and identifies the sender/time window.
View query
Q-01Recover suspicious external Teams support contact
What this checks
Identify Teams messages from an external sender using an IT/helpdesk-style display name and targeting denis@example.com before the endpoint activity.
KQL
let target_user_object_id = "<USER_OBJECT_ID>";
let organization_domains = dynamic(["example.com"]);
MessageEvents
| where Timestamp >= ago(7d)
| extend Recipient=parse_json(RecipientDetails)
| mv-expand Recipient
| extend
VictimAccountObjectId=tostring(Recipient.RecipientObjectId),
VictimRecipientDisplayName=tostring(Recipient.RecipientDisplayName),
SenderDomain=tolower(extract(@"@([^>]+)$", 1, SenderEmailAddress))
| where VictimAccountObjectId == target_user_object_id
| where isnotempty(SenderDomain) and SenderDomain !in~ (organization_domains)
| where SenderDisplayName has_any (
"helpdesk",
"help desk",
"it support",
"microsoft support",
"security",
"service desk"
)
| project
Timestamp,
SenderEmailAddress,
SenderDisplayName,
SenderDomain,
VictimRecipientDisplayName,
VictimAccountObjectId,
ThreatTypes,
DeliveryAction,
NetworkMessageId
| order by Timestamp ascSPL
index=<teams_message_index> sourcetype=<defender_messageevents_sourcetype>
earliest=-7d
| eval
sender=lower(coalesce(sender,SenderEmailAddress)),
sender_display=lower(coalesce(sender_display,SenderDisplayName)),
sender_domain=lower(replace(sender,"^.*@","")),
recipient_object_id=coalesce(recipient_object_id,RecipientObjectId),
message_id=coalesce(message_id,NetworkMessageId)
| where recipient_object_id="<USER_OBJECT_ID>"
AND sender_domain!="example.com"
AND (
like(sender_display,"%helpdesk%")
OR like(sender_display,"%help desk%")
OR like(sender_display,"%it support%")
OR like(sender_display,"%microsoft support%")
OR like(sender_display,"%security%")
OR like(sender_display,"%service desk%")
)
| fields _time sender sender_display sender_domain recipient_object_id ThreatTypes DeliveryAction message_id
| sort 0 _timeWhat to look for
A helpdesk/security-themed external sender targeting the affected user in the relevant timeframe.
Technical details
Tested signal
External collaboration message using support/security/helpdesk pretext shortly before remote-assistance activity.
Assumptions
- MessageEvents contains Teams message sender and RecipientDetails data.
- The local tenant domains are known and can be excluded explicitly.
Data requirements and relevant fields
- saas audit
Microsoft Defender XDR MessageEvents representing Microsoft Teams collaboration events with sender and recipient identity context.
TimestampSenderEmailAddressSenderDisplayNameRecipientDetailsNetworkMessageIdThreatTypesDeliveryAction
KQL schema
Validate Microsoft Defender for Office 365 / Teams message coverage, Defender for Endpoint deployment, field population, and local retention.
SPL schema
Replace index/sourcetype placeholders and normalize collaboration, process, network, and account fields to the local data model.
Limitations
- Legitimate vendors and outsourced support can contact users from external tenants.
- Display-name keywords are only a triage aid; the external sender/tenant context and subsequent endpoint behavior matter more.
KQL uses Microsoft Defender XDR collaboration and endpoint telemetry. SPL is a normalized raw-event scaffold and requires local field mapping.
More reasoning
Observation
The user reports an unsolicited Teams support interaction shortly before compromise.
Working explanation
An external actor may have impersonated internal IT/helpdesk staff to initiate the remote-access workflow.
What was checked
Review Teams MessageEvents for external support-themed senders targeting the affected identity.
Interpretation
External collaboration alone is not malicious; the remote-access transition is the decisive next signal.