Safe Links should rewrite and scan links in Office desktop and web apps
This check looks at your Safe Links policies in Microsoft Defender for Office 365 and whether link scanning is turned on for Office apps. The safe setting is a Safe Links policy that covers your users and has Office application protection enabled.
Why it matters
People rarely open an attack from a link in an email alone. They also click links inside a Word file, an Excel sheet or a shared presentation, because those feel more trustworthy than a message from a stranger. Safe Links checks the destination of a link at the moment it is clicked, so a page that was harmless when the mail arrived but turned malicious later can still be blocked.
When Office application protection is off, a link that sits inside a document skips that click-time check. Attackers know this, and they hide the real payload behind a document that arrives through a clean-looking route. Microsoft describes the feature and the places it can protect (email, Teams and Office apps) in its Safe Links overview.
The setting costs nothing in daily work for most users, and it removes a gap that is easy to miss during a normal policy review, because the email-only part of the policy looks complete.
How to check it yourself
Portal: Microsoft Defender portal → Email & collaboration → Policies & rules → Threat policies → Safe Links. Open each policy and look at the URL and click protection settings for Office 365 apps, plus the users, groups and domains the policy applies to.
Read-only command (Exchange Online PowerShell, no changes are made):
Connect-ExchangeOnline
Get-SafeLinksPolicy | Format-List Name, EnableSafeLinksForOffice, EnableSafeLinksForEmail, EnableSafeLinksForTeams, TrackClicks, AllowClickThrough
Get-SafeLinksRule | Format-Table Name, SafeLinksPolicy, State, PriorityYou want a policy where EnableSafeLinksForOffice is True, with an enabled rule that targets all of the users you care about. A policy with no matching rule protects nobody.
How to fix it
Portal: in the Safe Links page, create a new policy or edit the existing one. Under URL and click protection settings, turn on Safe Links checking for Office 365 apps. Then, under Users and domains, include every user, group and domain you want covered, and save.
Script (edit the policy name for your tenant, and run it on a test policy first):
Connect-ExchangeOnline
Set-SafeLinksPolicy -Identity "Standard Safe Links" -EnableSafeLinksForOffice $trueIf you have no policy at all, create one with New-SafeLinksPolicy and a matching New-SafeLinksRule. ConfigCobra only reads your tenant and reports this check; the change itself is always made by you or your admin.
What changes when you fix it
Users who open a document with links will see those links checked at click time. If a link is judged unsafe, they get a warning page instead of the site. Most people will not notice any difference for ordinary links.
Links are rewritten or checked through a Microsoft service, so a few legitimate but unusual links, for example to internal tools or sites that dislike redirects, can behave differently. Admins should expect a small number of questions from users and may need to add a trusted URL to the policy's do-not-rewrite list. Pilot the change on a small group before widening it.
Included in
| Benchmark | CIS ID | Profile |
|---|---|---|
| CIS Microsoft 365 Foundations v7.0.0 | 2.1.1 | E5 Level 2 |
More checks in Microsoft Defender
- 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
- Exchange Online spam policies should notify administratorsCIS 2.1.6
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.