← Back to SOC feed Coverage →

Total number of MDO Teams protection detections daily

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

Hunt Hypothesis

The hypothesis is that an adversary is attempting to evade detection by bypassing MDO Teams protections, which could indicate lateral movement or persistence. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential advanced persistent threats that may be evading standard detection mechanisms.

KQL Query

//Total number of MDO Teams protection detections daily 
let minTime = toscalar(MessageEvents | summarize min(Timestamp));
let maxTime = toscalar(MessageEvents | summarize max(Timestamp));
let baseQuery = MessageEvents
//| where IsOwnedThread==0 and IsExternalThread==1 
| where isnotempty(Timestamp);
let totalwiththreat = baseQuery
| where isnotempty(ThreatTypes) 
| make-series Count= count() default = 0 on Timestamp from minTime to maxTime step 1d 
| extend Details = "Total Teams messages with Threat";
let totalwithphishthreat = baseQuery
| where ThreatTypes has ('Phish')
| make-series Count= count() default = 0 on Timestamp from minTime to maxTime step 1d 
| extend Details = "Total Teams messages with Phish Threat";
let totalwithmalwarethreat = baseQuery
| where ThreatTypes has ('Malware')
| make-series Count= count() default = 0 on Timestamp from minTime to maxTime step 1d 
| extend Details = "Total Teams messages with Malware Threat";
union totalwiththreat, totalwithphishthreat, totalwithmalwarethreat
| project Count, Details, Timestamp
| render timechart

Analytic Rule Definition

id: c7896b13-ae4e-4164-a0a4-fbd43ae85dd4
name:  Total number of MDO Teams protection detections daily
description: |
  This query visulises Total number of MDO Teams protection detections daily 
description-detailed: |
  This query visulises Total number of MDO Teams protection detections daily 
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - MessageEvents
tactics:
  - DefenseEvasion
relevantTechniques:
  - T1562
query: |
 //Total number of MDO Teams protection detections daily 
 let minTime = toscalar(MessageEvents | summarize min(Timestamp));
 let maxTime = toscalar(MessageEvents | summarize max(Timestamp));
 let baseQuery = MessageEvents
 //| where IsOwnedThread==0 and IsExternalThread==1 
 | where isnotempty(Timestamp);
 let totalwiththreat = baseQuery
 | where isnotempty(ThreatTypes) 
 | make-series Count= count() default = 0 on Timestamp from minTime to maxTime step 1d 
 | extend Details = "Total Teams messages with Threat";
 let totalwithphishthreat = baseQuery
 | where ThreatTypes has ('Phish')
 | make-series Count= count() default = 0 on Timestamp from minTime to maxTime step 1d 
 | extend Details = "Total Teams messages with Phish Threat";
 let totalwithmalwarethreat = baseQuery
 | where ThreatTypes has ('Malware')
 | make-series Count= count() default = 0 on Timestamp from minTime to maxTime step 1d 
 | extend Details = "Total Teams messages with Malware Threat";
 union totalwiththreat, totalwithphishthreat, totalwithmalwarethreat
 | project Count, Details, Timestamp
 | render timechart
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/Total number of MDO Teams protection detections daily.yaml