The connection filter IP allow list should stay empty
This check looks at the default connection filter policy in Exchange Online Protection and whether any addresses sit on its IP allow list. The safe setting is an empty list, so every inbound sender goes through spam filtering.
Why it matters
Anything on the IP allow list skips spam filtering for all mail coming from those addresses. Microsoft states that such messages are still scanned for malware and high-confidence phishing, but ordinary spam and many phishing attempts are no longer judged. If a listed address is shared, reassigned or abused (a hosting provider, a marketing platform, a compromised relay), an attacker inherits that trust without any effort.
Allow list entries tend to be added in a hurry to fix one missed message and then forgotten, so over time the list drifts away from what anyone can justify. Microsoft's own guidance treats the list as one part of a wider allow strategy, and recommends handling trusted senders in narrower, more visible ways.
Source: Microsoft Learn, Configure the default connection filter policy.
How to check it yourself
Portal: Microsoft Defender portal > Email & collaboration > Policies & rules > Threat policies > Anti-spam > Connection filter policy (Default). Look at the field labelled Always allow messages from the following IP addresses or address range.
Read-only command in Exchange Online PowerShell:
Connect-ExchangeOnline
Get-HostedConnectionFilterPolicy -Identity Default | Format-List IPAllowList, IPBlockList, EnableSafeListThe safe setting is an empty IPAllowList. Run this from an admin workstation with a read-only role such as Security Reader.
How to fix it
Before removing anything, write down who owns each listed address and which mail flow depends on it. Then:
Portal: open the default connection filter policy, choose Edit connection filter policy, remove each entry from the allow list, and save.
PowerShell (run by an admin, not by ConfigCobra):
Set-HostedConnectionFilterPolicy -Identity Default -IPAllowList $nullConfigCobra itself never changes your tenant; it only reports the finding and offers a suggested fix. For senders that really need special handling, use a narrower tool such as a targeted mail flow rule or the Tenant Allow/Block List, and review those entries on a schedule.
What changes when you fix it
Mail from the formerly listed addresses is now filtered like any other sender. Newsletters, scanners, CRM or ticketing systems and partner relays that used to bypass filtering may start landing in junk or being quarantined, and people may report missing messages. Look at message trace for those addresses for a few days beforehand to see how much mail is involved, tell the mailbox owners, and be ready to add a narrow exception for a legitimate sender if it is wrongly caught. Users, admins and the mail-flow owners are the groups affected; nothing about licensing or sign-in changes.
Included in
| Benchmark | CIS ID | Profile |
|---|---|---|
| CIS Microsoft 365 Foundations v7.0.0 | 2.1.12 | E3 Level 1 |
More checks in Microsoft Defender
- Safe Links for Office Applications should be enabledCIS 2.1.1
- The common attachment types filter should be enabledCIS 2.1.2
- Notifications for internal users sending malware should be enabledCIS 2.1.3
- Safe Attachments policy should be enabledCIS 2.1.4
- Safe Attachments for SharePoint, OneDrive, and Microsoft Teams should be enabledCIS 2.1.5
Go further
- Microsoft Defender21 controls in this section
- CIS Microsoft 365 Foundations v7.0.0160 controls
- CIS Microsoft 365 Foundations checklistEvery control in one list, as CSV
- RemediationSee what a fix changes in your tenant before you apply it, then use the generated script
- Monitoring & DriftScheduled scans, drift detection and email alerts when a control regresses
Check this on your Microsoft 365
ConfigCobra runs this check with every other control of the CIS Microsoft 365 Foundations Benchmark, read-only.