This rule identifies Microsoft Teams threads where internal conversations are exposed to external participants, a common vector for phishing or data exfiltration under MITRE technique T1566. Proactively hunting for these exposures allows the SOC to detect unauthorized sharing of sensitive internal communications before they lead to credential compromise or information leakage.
//This query shows de-duplicated Microsoft Teams messages split by whether the thread includes external participants.
MessageEvents
| where Timestamp > ago(30d)
| summarize arg_max(Timestamp, *) by TeamsMessageId
| extend Thread = iif(IsExternalThread == true, "External Thread", "Internal Thread")
| summarize Count = count() by Thread
| render piechart
id: b26c8461-8c9e-47ff-8b61-fe0f1fb8eea4
name: Microsoft Teams External versus Internal Thread Exposure
description: |
This query shows de-duplicated Microsoft Teams messages split by whether the thread includes external participants.
description-detailed: |
This query shows de-duplicated Microsoft Teams messages split by whether the thread includes external participants, using Advanced hunting in Microsoft Defender XDR. External threads carry the higher risk of social-engineering and malicious content.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
dataTypes:
- MessageEvents
tactics:
- InitialAccess
relevantTechniques:
- T1566
query: |
//This query shows de-duplicated Microsoft Teams messages split by whether the thread includes external participants.
MessageEvents
| where Timestamp > ago(30d)
| summarize arg_max(Timestamp, *) by TeamsMessageId
| extend Thread = iif(IsExternalThread == true, "External Thread", "Internal Thread")
| summarize Count = count() by Thread
| render piechart
version: 1.0.0
#incidents, #support, or #vendor and the external participant’s domain matches a known vendor list (e.g., @aws.com, @azure.com).#procurement, #finance, or #audit where the external participant’s role is explicitly set to “Guest” and the message content includes standard audit-related keywords (e.g., “invoice”, “contract”, “evidence”).#campaign- or #marketing- where the external participant’s domain belongs to a pre-approved agency list (e.g., @agency.com, @creativefirm.io) and the message timestamp falls within business hours.#onboarding or #hr-support where the external participant’s domain matches known HR service providers (e.g., @backgroundcheck.com, `@payrollprovider