← Back to SOC feed Coverage →

Inbound Teams messages by sender domains

kql MEDIUM Azure-Sentinel
T1562
huntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-11T23:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may use malicious domains to send large volumes of inbound Teams messages as part of credential harvesting or phishing campaigns. SOC teams should proactively hunt for this behavior to identify potential compromise and mitigate lateral movement risks in their Azure Sentinel environment.

KQL Query

//This query helps reviewing volume of inbound external Teams message by sender domains
 MessageEvents 
 | where IsExternalThread==1 and IsOwnedThread==1
 | mv-expand Recipients = RecipientDetails
 | extend RecipientEmailAddress = Recipients.RecipientSmtpAddress, RecipientDisplayName = Recipients.RecipientDisplayName, RecipientObjectId = Recipients.RecipientObjectId, RecipientType = Recipients.RecipientType
 | extend Domain = substring(RecipientEmailAddress, indexof(RecipientEmailAddress, "@")+1)
 | summarize total=count() by Domain, bin(Timestamp, 1d) 
 | order by Timestamp asc

Analytic Rule Definition

id: 15688e35-9957-427f-a8fb-95b7883120b3
name:  Inbound Teams messages by sender domains
description: |
  This query helps reviewing volume of inbound external Teams message by sender domains 
description-detailed: |
  This query helps reviewing volume of inbound external Teams message by sender domains 
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - MessageEvents
tactics:
  - DefenseEvasion
relevantTechniques:
  - T1562
query: |
 //This query helps reviewing volume of inbound external Teams message by sender domains
  MessageEvents 
  | where IsExternalThread==1 and IsOwnedThread==1
  | mv-expand Recipients = RecipientDetails
  | extend RecipientEmailAddress = Recipients.RecipientSmtpAddress, RecipientDisplayName = Recipients.RecipientDisplayName, RecipientObjectId = Recipients.RecipientObjectId, RecipientType = Recipients.RecipientType
  | extend Domain = substring(RecipientEmailAddress, indexof(RecipientEmailAddress, "@")+1)
  | summarize total=count() by Domain, bin(Timestamp, 1d) 
  | order by Timestamp asc
version: 1.0.0

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Email and Collaboration Queries/Microsoft Teams protection/Inbound Teams messages by sender domains.yaml