Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Microsoft 365 Foundations v7.0.0 · 2.4.4

Zero-hour auto purge should be turned on for Microsoft Teams

  • E5 Level 1
  • Microsoft Defender
  • Automated check

This check looks at the Teams protection policy in Microsoft Defender for Office 365 and whether zero-hour auto purge (ZAP) is switched on. The safe setting is ZAP for Teams turned on, so messages later found to be malware or high-confidence phishing are pulled back after delivery.

Why it matters

A chat message can look harmless when it arrives and only be flagged as malicious later, once Microsoft's detection signals catch up. Chat feels informal, so people tend to click links and open files there with less suspicion than in email. ZAP closes that gap: after delivery, it acts on Teams messages that are later identified as malware or high-confidence phishing and quarantines them. Because everyone in a chat gets the same copy of a message, a block removes it for every participant at once.

Microsoft's documentation says the protection covers internal messages in chats and standard channels, and that action can come up to 48 hours after delivery. Messages from external senders in chats are not covered, so ZAP is one layer and not a full answer to Teams abuse. It needs Microsoft Defender for Office 365 Plan 1 or Plan 2.

Sources: Zero-hour auto purge in Defender for Office 365 and Defender for Office 365 support for Teams on Microsoft Learn.

How to check it yourself

In the Microsoft Defender portal (security.microsoft.com), go to Settings > Email & collaboration > Microsoft Teams protection. In the Zero-hour auto purge (ZAP) section the toggle should be On. Also read the Exclude these participants list, because ZAP does not act for recipients who are excluded.

Read-only check with Exchange Online PowerShell:

Connect-ExchangeOnline
Get-TeamsProtectionPolicy | Format-List Name,ZapEnabled,HighConfidencePhishQuarantineTag,MalwareQuarantineTag
Get-TeamsProtectionPolicyRule | Format-List Name,ExceptIfSentTo,ExceptIfSentToMemberOf,ExceptIfRecipientDomainIs

The safe result is ZapEnabled : True. If the second command returns nothing, no exclusions are defined. Try this on a test tenant first if you can.

How to fix it

In the Defender portal, open Settings > Email & collaboration > Microsoft Teams protection, move the ZAP toggle to On, review the exclusions and select Save. You need an account allowed to manage these settings in Defender, and a Defender for Office 365 plan in your licence set.

The same change in Exchange Online PowerShell:

Set-TeamsProtectionPolicy -Identity "Teams Protection Policy" -ZapEnabled $true

ConfigCobra itself only reads your tenant and never changes it. Apply the fix yourself through the portal or the script above, then run a new scan to confirm the check now passes.

What changes when you fix it

Users notice nothing during normal use. A message that ZAP later flags as malware or high-confidence phishing is blocked for everyone in that chat, and it goes to quarantine. Microsoft states that quarantined Teams messages can currently be managed by admins only, and users do not receive quarantine notifications, so tell your security or help desk team to expect questions such as "a message disappeared". Admins release or review those messages in the Defender portal quarantine view.

If you excluded users, groups or domains, ZAP will skip them. Keep that list short and review it now and then. Turning ZAP on does not alter older messages that were already judged clean.

Included in

BenchmarkCIS IDProfile
CIS Microsoft 365 Foundations v7.0.02.4.4E5 Level 1

Check this on your Microsoft 365

ConfigCobra runs this check with every other control of the CIS Microsoft 365 Foundations Benchmark, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial