Defender for Office 365: Safe Links, Safe Attachments and Anti-Phishing

Which policy applies to whom in Defender for Office 365? Preset policies, Safe Attachments, Safe Links, impersonation lists, quarantine and verifying settings.
Technical summary
Technology
Exchange Online Protection, Microsoft Defender for Office 365 Plan 1/Plan 2, Exchange Online PowerShell
Topic
Configuring and verifying email protection policies at the settings level
Level
Intermediate–advanced
Prerequisites
  • A Microsoft 365 tenant using Exchange Online
  • A Defender for Office 365 license
  • The Security Administrator or an equivalent role
In this article8 sections

In tenants with a Defender for Office 365 license, we often see impersonation protection running with an empty user list. The profile looks on, the report looks green, and a fake message in the CFO’s name still lands in the inbox. Basic filtering already runs in Exchange Online; Defender for Office 365 adds extra scanning, time-of-click URL checks and impersonation detection. But a license doesn’t mean protection. This guide takes Microsoft 365 administrators and security teams through policy scope, priority order, quarantine behavior and exceptions in turn, and ends with a verification method.

The difference between EOP and Defender for Office 365

Exchange Online Protection (EOP) is the layer included with Exchange Online: malware scanning, spam and bulk mail filtering, spoof protection and basic phishing protection. Defender for Office 365 (MDO) sits on top of this layer.

Capability EOP MDO Plan 1 MDO Plan 2
Anti-malware, anti-spam, spoof Yes Yes Yes
Safe Attachments (sandbox) None Yes Yes
Safe Links (time of click) None Yes Yes
User and domain impersonation None Yes Yes
Threat Explorer, AIR, simulation None None Yes

Be careful if the MX record points not directly to Microsoft 365 but to a third-party gateway. If Enhanced Filtering for Connectors isn’t configured on the inbound connector, SPF and source IP evaluation is done against the gateway’s IP. The real sender isn’t visible. Spoof detection weakens noticeably in this case; in hybrid tenants and those behind a gateway, it’s the first setting to check in the console.

Preset security policies

Microsoft offers anti-spam, anti-malware, anti-phishing, Safe Links and Safe Attachments settings as two profiles: Standard and Strict. Microsoft updates the profiles; when a new setting is added or a recommended value changes, it’s reflected in the tenant automatically. In addition, there’s a Built-in protection profile that turns on Safe Links and Safe Attachments for all MDO-licensed recipients.

The order of application is: Strict, Standard, custom policies (in their own priority order), and last built-in protection and the default policies. The first matching policy is applied to the recipient, and the rest aren’t looked at. That’s why the “Standard for everyone, Strict for targeted groups” approach gives the lowest maintenance load without writing custom policies. Fewer policies, fewer surprises.

Setting Default Standard Strict
Bulk mail threshold (BCL) 7 6 5
Spam action Junk folder Junk folder Quarantine
Phishing threshold 1 – Standard 3 – More aggressive 4 – Most aggressive
Safe Attachments action – Block Block

Values may change over time according to Microsoft’s recommendations; check the current table in the recommended settings documentation. For impersonation protection to work in preset policies, you need to enter the users and domains to protect. If this step is skipped, the profile looks on but user impersonation detection runs with an empty list. That’s exactly the scenario from the introduction.

Safe Attachments and attachment sandboxing

Safe Attachments opens attachments in a virtual environment before delivery and looks at their behavior. Policy actions:

  • Off: Attachments aren’t scanned. Only if another sandbox is used and this is a deliberate decision.
  • Monitor: The message is delivered, and the result is only reported. For measuring impact during a transition.
  • Block: The message is held until scanning finishes; if found malicious, it goes to quarantine. The choice of the preset policies.
  • Dynamic Delivery: The body is delivered immediately, and the attachment is shown with a placeholder until scanning finishes. It works only for Exchange Online mailboxes.

For sales or customer service teams complaining about delivery delays, dynamic delivery is a reasonable compromise; but it isn’t in the preset policies and requires a custom policy. There’s a separate global setting for files in SharePoint, OneDrive and Teams. Blocking the download of a file flagged as malicious, on the other hand, is turned on separately on the SharePoint side. Don’t skip the second line.

Connect-ExchangeOnline
Set-AtpPolicyForO365 -EnableATPForSPOTeamsODB $true

Connect-SPOService -Url https://contoso-admin.sharepoint.com
Set-SPOTenant -DisallowInfectedFileDownload $true

Safe Links checks links in email, Teams and Office apps at the time of click. Its real value lies in links that look clean at the time of sending but are made malicious later. The attacker waits. Settings to review:

  • Not delivering the message until URL scanning finishes (decisive for links that download files).
  • Applying Safe Links to messages sent from inside the organization too; a compromised internal account is a typical spread route.
  • Not letting users click through from the warning page to the original URL.
  • Tracking clicks; it’s needed to see who clicked during incident investigation.

If a URL needs to be blocked in all circumstances, the Tenant Allow/Block List is used instead of the Safe Links policy. A mistake we often run into in the field: because a partner’s link gave a false positive, URL rewriting is turned off for the whole policy. The whole tenant is opened up for one link. The right way is to report the false positive to Microsoft from the Submissions page and, if needed, create a time-limited allow entry.

Impersonation and anti-phishing settings

The anti-phishing policy brings together four separate detection types:

Detection What it catches Setting to make
Spoof intelligence Unauthorized use of the sender domain On; honor the DMARC policy
User impersonation Look-alikes of executive names Add the users to protect
Domain impersonation Look-alike domains Your own and partner domains
Mailbox intelligence Senders outside usual correspondence On; action is Junk in Standard, quarantine in Strict

The CEO, CFO, finance managers and people who approve payments go into the protected users list. In protected domains, add the domains of suppliers you often receive invoices from alongside your own domains; that makes it easier to catch a message from a domain with one letter changed in BEC and fake invoice fraud scenarios. The first contact safety tip and the unverified sender indicator give the user a cheap extra signal. Tightening your own domain’s DMARC policy increases the effect of these settings; the stages are in the DMARC p=reject migration guide.

Quarantine policies and user notifications

A quarantine policy determines what the user can do with a quarantined message: see nothing, see it but only request release, or release it themselves. Ready-made policies come with the names AdminOnlyAccessPolicy, DefaultFullAccessPolicy and DefaultFullAccessWithNotificationPolicy. Users can’t release malware and high confidence phishing messages themselves; in these categories, the “user requests, administrator approves” model should be applied from an enterprise cybersecurity standpoint.

Turning on user notifications for spam quarantine reduces the support load. But the notification message itself is also a template open to imitation. Show in user training what the real notification looks like. Reporting suspicious messages with the built-in Report button in Outlook, and copying reports to a security mailbox as well, is the raw input for incident investigation; how to investigate a reported message is laid out step by step in the suspicious email header analysis article.

Verifying the configuration

Configuration analyzer, under Threat policies in the Defender portal, compares your custom policies with the Standard and Strict profiles and lists the settings that deviate. Review it every three months together with a PowerShell dump. Exceptions pile up silently. A regular dump keeps them visible and is a natural part of Microsoft 365 security audits.

Connect-ExchangeOnline
# Scope of the preset policies
Get-EOPProtectionPolicyRule | Format-Table Name, State, Priority
Get-ATPProtectionPolicyRule | Format-Table Name, State, Priority

# Critical settings of custom policies
Get-AntiPhishPolicy | Format-Table Name, PhishThresholdLevel, EnableMailboxIntelligenceProtection, EnableTargetedUserProtection
Get-SafeAttachmentPolicy | Format-Table Name, Enable, Action
Get-SafeLinksPolicy | Format-Table Name, TrackClicks, AllowClickThrough, EnableForInternalSenders
Get-HostedContentFilterPolicy | Format-Table Name, BulkThreshold, SpamAction, HighConfidencePhishAction

# Build-up in allow lists
Get-TenantAllowBlockListItems -ListType Sender -Allow

The first place to look in the output is the Get-TenantAllowBlockListItems result. Sender allows with no expiry are exceptions once opened as “temporary” and then forgotten.

Verification checklist:

  • All users are within Standard or Strict scope; no group is left out.
  • Impersonation lists are up to date; executives who have left have been removed.
  • There are no sender or domain allows without expiry in the tenant allow list.
  • User reports reach the security mailbox.
  • An owner and a time frame are defined for quarantine release requests.
  • If there’s a third-party gateway, enhanced filtering is configured.

To assess authentication, filtering and user awareness together, see the email security and phishing protection service page.

Frequently asked questions

Should you choose Standard or Strict?

For most users, Standard is enough. Strict is applied to groups that are likely to be targeted and can bear the cost of false positives, such as executives, finance and people who approve payments. If both policies apply to the same user, Strict takes precedence.

When preset policies exist, is it necessary to create custom policies?

Only if you need a setting the preset policies don’t offer; for example, dynamic delivery in Safe Attachments or not rewriting certain URLs in Safe Links. When you create a custom policy, you have to track changes to Microsoft’s recommendations yourself.

Why does a third-party phishing simulation end up in quarantine?

Simulation messages are filtered because they look like real phishing. Don’t bypass this with an allow list or a transport rule; define the sending domain, IPs and URLs of the simulation in the advanced delivery policy. This method doesn’t weaken other protections.

What’s the main difference between Plan 1 and Plan 2?

Plan 1 includes the protection features (Safe Attachments, Safe Links, impersonation protection, real-time detections). Plan 2 adds investigation and response tools such as Threat Explorer, automated investigation and response, campaign views and attack simulation training.

Support

Contact us for support or a discovery session on this topic.

Contact form
[email protected]

Eretek Cybersecurity

Firewall, VPN, endpoint security and threat prevention. We reduce the attack surface and measure and report the risks.

Knowledge Center

Other articles