What this check looks at
Checks no inbound anti-spam policy delivers spam or high-confidence spam to the inbox (only marked with a header or a changed subject): it goes to the Junk Email folder or to quarantine.
The inbound anti-spam policy also says what happens to spam and to high-confidence spam. Moving it to the Junk Email folder or to quarantine keeps it out of the way; adding a header or a word to the subject delivers it to the inbox, where it reads like any other email.
The check reads every inbound anti-spam policy and passes when no policy leaves spam or high-confidence spam in the inbox. It fails naming each policy that does, and reports not checked when the actions were not returned.
Why it matters
Spam left in the inbox with only a tag in its subject reads like any other email, and the scams that slip into it arrive next to genuine mail. Moving it to Junk or quarantine is the filter doing its job.
An inbox full of tagged spam teaches people to skim and click. The scams and fake invoices that slip through the filter arrive between the spam, and a busy person is more likely to open one when everything around it looks the same.
Moving spam to Junk Email is Microsoft’s default and its recommended setting, so a policy that delivers spam to the inbox was usually changed on purpose, often years ago, to work around one sender. That sender is better handled with the Tenant Allow/Block List.
How to fix it
Where: Microsoft Defender portal → Email & collaboration → Policies & rules → Threat policies → Anti-spam
Before you start
- Tell people that spam now goes to Junk Email, and to look there before asking for a missing message.
Step by step
- See each policy’s actions. Run Get-HostedContentFilterPolicy | Format-Table Name, SpamAction, HighConfidenceSpamAction to list what each inbound anti-spam policy does with spam.
- Find out why it was changed. Ask whether a sender’s mail was being lost when the action was changed. If so, add that sender to the Tenant Allow/Block List instead, so the rest of the spam can go back to Junk.
- Move spam out of the inbox. In the Defender portal, Anti-spam, open each inbound policy, choose Actions and set Spam to Move message to Junk Email folder and High confidence spam to Quarantine message (or Junk Email).
- Tell people where to look. Let staff know spam now goes to their Junk Email folder, and that a message they were expecting may be there before they ask the helpdesk.
- Confirm the setting. Run the command from the first step again and check every policy shows MoveToJmf or Quarantine. The next assessment passes.
With PowerShell
Get-HostedContentFilterPolicy | Set-HostedContentFilterPolicy -SpamAction MoveToJmf -HighConfidenceSpamAction Quarantine
What users will notice
Spam goes to the Junk Email folder (high-confidence spam to quarantine) instead of the inbox with a tag.
How to confirm it worked
Get-HostedContentFilterPolicy | Format-Table Name, SpamAction, HighConfidenceSpamAction shows MoveToJmf or Quarantine for every policy.
Frameworks and controls
This check maps to controls in 12 frameworks. Passing it is evidence that the setting is in place, not a certification against any of them.
| Framework | Control |
|---|---|
| NCSC CAF | B4.b Secure configuration |
| DSPT | Standard 9: IT protection |
| NIS2 | Art. 21(2)(e) Security in acquisition, development and maintenance, including vulnerability handling |
| Zero Trust | Applications |
| SOC 2 | CC6.8 Preventing or detecting unauthorised or malicious software |
| PCI DSS 4.0.1 | 5.4.1 Personnel are protected against phishing attacks |
| NIST SP 800-171 | 3.14.2 Provide protection from malicious code |
| CMMC Level 2 | SI.L2-3.14.2 Malicious Code Protection |
| ISO 27001:2022 | A.8.7 Protection against malware |
| CIS Controls v8.1 | 9.7 Deploy and maintain email server anti-malware protections (IG3) |
| NIST CSF 2.0 | PR.PS-01: Configuration management practices are established and applied |
| NCSC 10 Steps | Architecture and configuration |
The framework mappings were last checked against the published standards in October 2026.
Microsoft’s documentation
- Anti-spam policy settings (Microsoft Learn)