← Back to SOC feed Coverage →

Teams messages from a specific sender by ThreadType

kql MEDIUM Azure-Sentinel
T1566
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-12T11:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may use specific sender accounts in Teams to communicate within threads, leveraging T1566 to exfiltrate data or coordinate attacks. SOC teams should proactively hunt for this behavior to identify potential lateral movement or command and control activities in their Azure Sentinel environment.

KQL Query

//This query gets the count of messages from a sender across all types of conversations
let Sender = "[email protected]";
MessageEvents
| where SenderEmailAddress == Sender
| summarize Count = count() by ThreadType

Analytic Rule Definition

id: 0bb4d681-5aa5-414e-b512-42a682ce5117
name: Teams messages from a specific sender by ThreadType
description: |
  This query helps hunt for Teams messages from a specific sender by ThreadType.
description-detailed: |
  This query helps hunt for Teams messages from a specific sender by ThreadType, using Microsoft Defender for Office 365 and Advance hunting in Microsoft Defender XDR
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - MessageEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  //This query gets the count of messages from a sender across all types of conversations
  let Sender = "[email protected]";
  MessageEvents
  | where SenderEmailAddress == Sender
  | summarize Count = count() by ThreadType
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/Teams messages from a specific sender by ThreadType.yaml