← Back to SOC feed Coverage →

Teams Spam ZAP

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 Teams to spam ZAPed messages as part of a phishing or credential harvesting campaign. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential credential theft or lateral movement attempts.

KQL Query

//Zero-hour auto purge (ZAP) took action on Teams messages containing Spam after delivery
MessagePostDeliveryEvents
| where ActionType == 'Spam ZAP' 

Analytic Rule Definition

id: f9e101e9-a71c-4ed5-a248-31965fe6ace6
name: Teams Spam ZAP
description: |
  This query helps hunt for Teams messages with Spam threats that have been ZAPed.
description-detailed: |
  This query helps hunt for Teams messages with Spam threats that have been ZAPed, using Microsoft Defender for Office 365 and Advance hunting in Microsoft Defender XDR
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - MessagePostDeliveryEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  //Zero-hour auto purge (ZAP) took action on Teams messages containing Spam after delivery
  MessagePostDeliveryEvents
  | where ActionType == 'Spam ZAP' 
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 Spam ZAP.yaml