← Back to SOC feed Coverage →

Teams File Protection Summary

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

Hunt Hypothesis

This hypothesis targets adversaries leveraging Microsoft Teams as a primary vector for initial access (T1566) by distributing malicious files that may bypass standard email gateways or user vigilance. Proactively hunting for this behavior in Azure Sentinel is critical to identify compromised file protection settings or undetected malware, ensuring that the collaboration platform is not exploited to establish a foothold within the organization.

KQL Query

//This query summarizes Microsoft Teams file protection by Microsoft Defender for Office 365: files scanned, files with malware detected, and files scanned with no detection.
let base = FileMaliciousContentInfo
    | where Timestamp > ago(30d)
    | where Workload == "MicrosoftTeams";
union
(base | summarize Count = count() | extend Details = "Teams Files Scanned", Ord = 1),
(base | where isnotempty(ThreatTypes) | summarize Count = count() | extend Details = "Files with Malware Detected", Ord = 2),
(base | where isempty(ThreatTypes) | summarize Count = count() | extend Details = "Files Scanned - No Detection", Ord = 3)
| sort by Ord asc
| project Count, Details

Analytic Rule Definition

id: 27ce9419-ad42-4fff-94df-9ad4b3c613ab
name: Teams File Protection Summary
description: |
  This query summarizes Microsoft Teams file protection: files scanned, files with malware detected, and files with no detection.
description-detailed: |
  This query summarizes Microsoft Teams file protection by Microsoft Defender for Office 365 - files scanned, files with malware detected, and files scanned with no detection, using Advanced hunting in Microsoft Defender XDR.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - FileMaliciousContentInfo
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  //This query summarizes Microsoft Teams file protection by Microsoft Defender for Office 365: files scanned, files with malware detected, and files scanned with no detection.
  let base = FileMaliciousContentInfo
      | where Timestamp > ago(30d)
      | where Workload == "MicrosoftTeams";
  union
  (base | summarize Count = count() | extend Details = "Teams Files Scanned", Ord = 1),
  (base | where isnotempty(ThreatTypes) | summarize Count = count() | extend Details = "Files with Malware Detected", Ord = 2),
  (base | where isempty(ThreatTypes) | summarize Count = count() | extend Details = "Files Scanned - No Detection", Ord = 3)
  | sort by Ord asc
  | project Count, Details
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 File Protection Summary.yaml