← Back to SOC feed Coverage →

External malicious Teams messages sent from internal senders

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-11T23:00:00Z · Confidence: medium

Hunt Hypothesis

External malicious Teams messages sent from internal senders indicate potential adversary attempts to exfiltrate data or spread malware through compromised internal accounts. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate insider threats or lateral movement tactics early.

KQL Query

//This query helps hunt for Teams messages from internal senders with Threats in them (Spam, Phish, Malware)
MessageEvents 
| where Timestamp > ago(30d)
| where IsExternalThread==1 and IsOwnedThread==1
| where ThreatTypes has_any ("Phish","Malware","Spam")                    
| project Timestamp,TeamsMessageId, SenderDisplayName, SenderEmailAddress, RecipientDetails, IsOwnedThread, ThreadType, IsExternalThread, ReportId, ThreatTypes, DetectionMethods

Analytic Rule Definition

id: aee866e2-dc92-4563-a387-b9e5710246c0
name: External malicious Teams messages sent from internal senders
description: |
  This query helps hunt for external malicious Teams messages sent from internal senders
description-detailed: |
  This query helps hunt for external malicious Teams messages sent from internal senders, 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 helps hunt for Teams messages from internal senders with Threats in them (Spam, Phish, Malware)
  MessageEvents 
  | where Timestamp > ago(30d)
  | where IsExternalThread==1 and IsOwnedThread==1
  | where ThreatTypes has_any ("Phish","Malware","Spam")                    
  | project Timestamp,TeamsMessageId, SenderDisplayName, SenderEmailAddress, RecipientDetails, IsOwnedThread, ThreadType, IsExternalThread, ReportId, ThreatTypes, DetectionMethods
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/External malicious Teams messages sent from internal senders.yaml