Complete Safe Links overview for Microsoft Defender for Office 365 - Microsoft Defender for Office 365 (original) (raw)

In organizations with Microsoft Defender for Office 365, Safe Links scanning protects your organization from malicious links that are used in phishing and other attacks. Specifically, Safe Links provides URL scanning and rewriting of inbound email messages during mail flow, and time-of-click verification of URLs and links in email messages, Teams, and supported Office 365 apps. Safe Links scanning occurs in addition to regular anti-spam and anti-malware protection.

Watch this short video on how to protect against malicious links with Safe Links in Microsoft Defender for Office 365.

Note

Although there's no default Safe Links policy, the Built-in protection preset security policy provides Safe Links protection in e-mail messages, Microsoft Teams, and files in supported Office apps to all recipients for customers that have at least one Defender for Office 365 license (users who aren't defined in the Standard or Strict preset security policies or in custom Safe Links policies). For more information, see Preset security policies. You can also create Safe Links policies that apply to specific users, group, or domains. For instructions, see Set up Safe Links policies in Microsoft Defender for Office 365.

If a system failure occurs when reading the Safe Links policy configuration from certain apps (for example, classic Outlook), the user doesn't receive Safe Links protection, and the user is redirected to the clicked link.

Safe Links protection by Safe Links policies is available in the following locations:

The following table describes scenarios for Safe Links in Microsoft 365 and Office 365 organizations that include Defender for Office 365 (note that lack of licensing is never an issue in the examples).

Scenario Result
Jean is a member of the marketing department. Safe Links protection for Office apps is turned on in a Safe Links policy that applies to members of the marketing department. Jean opens a PowerPoint presentation in an email message, and then clicks a URL in the presentation. Jean is protected by Safe Links. Jean is included in a Safe Links policy where Safe Links protection for Office apps is turned on. For more information about the requirements for Safe Links protection in Office apps, see the Safe Links settings for Office apps section later in this article.
Chris's Microsoft 365 E5 organization has no Safe Links policies configured. Chris receives an email from an external sender that contains a URL to a malicious website that he ultimately clicks. Chris is protected by Safe Links. The Built-in protection preset security policy provides Safe Links protection to all recipients (users who aren't defined in the Standard or Strict preset security policies or in custom Safe Links policies). For more information, see Preset security policies.
In Pat's organization, admins have created a Safe Links policy that applies Pat, but Safe Links protection for Office apps is turned off. Pat opens a Word document and clicks a URL in the file. Pat isn't protected by Safe Links. Although Pat is included in an active Safe Links policy, Safe Links protection for Office apps is turned off in that policy, so the protection can't be applied.
Jamie and Julia both work for contoso.com. A long time ago, admins configured Safe Links policies that apply to both of Jamie and Julia. Jamie sends an email to Julia, not knowing that the email contains a malicious URL. Julia is protected by Safe Links if the Safe Links policy that applies to her is configured to apply to messages between internal recipients. For more information, see the Safe Links settings for email messages section later in this article.
Jim's IT department configured SafeLinks to not rewrite URLs, and to check via API only. Jim clicks a link in an alternative email client that doesn't support the SafeLinks API. The link was legitimate on delivery, but was later weaponized. Jim is phished. Because the link wasn't malicious on delivery, SafeLinks didn't detect it.

Recipient filters use conditions and exceptions to identify the internal recipients that the policy applies to. At least one condition is required. You can use the following recipient filters for conditions and exceptions:

You can use a condition or exception only once, but the condition or exception can contain multiple values:

Safe Links scans incoming email for known malicious hyperlinks. Scanned URLs are rewritten or wrapped using the Microsoft standard URL prefix: https://<DataCenterLocation>.safelinks.protection.outlook.com (for example, https://nam01.safelinks.protection.outlook.com). If a users clicks a rewritten link, it's scanned for malicious content before directing the user to the page.

You can see a Safe Links URL by viewing the source code of the email message. This behavior protects against potential threats while maintaining readability and integrity in the normal email view. When a user hovers over a URL, a pop-up dialog displays the original URL, indicating it was scanned by Safe Links.

If URL rewriting is enabled, the URL is rewritten even if the message is manually forwarded or replied to. Wrapping is done per message recipient (both internal and external recipients). Additional links that are added to the forwarded or replied-to message are also rewritten.

For automatic forwarding by Inbox rules or SMTP forwarding, the URL isn't rewritten in the message that's intended for the final recipient unless one of the following statements is true:

As long as Safe Links protection is turned on, URLs are scanned prior to message delivery, regardless of whether the URLs are rewritten or not. If rewriting is enabled, links are scanned on click. If rewriting is disabled, unwrapped URLs are checked by a client-side Safe Links API call at the time of click in supported versions of Outlook (Windows, Mac, and Outlook on the web),

The settings in Safe Links policies that apply to email messages are described in the following list:

At a high level, here's how Safe Links protection works on URLs in email messages:

  1. All email goes through Microsoft 365 filtering, where internet protocol (IP) and envelope filters, signature-based malware protection, and anti-spam and anti-malware filters examine messages before messages are delivered to the recipient mailboxes.
  2. The user opens the message in their mailbox and clicks on a URL in the message.
  3. Safe Links immediately checks the URL before opening the website:
    • If the URL points to a website that has been determined to be malicious, a malicious website warning page (or a different warning page) opens.
    • If the URL points to a downloadable file, and the Apply real-time URL scanning for suspicious links and links that point to files setting is turned on in the policy that applies to the user, the downloadable file is checked.
    • If the URL is determined to be safe, the website opens.

You turn on or turn off Safe Links protection for Microsoft Teams in Safe Links policies. Specifically, you use the On: Safe Links checks a list of known, malicious links when users click links in Microsoft Teams. URLs are not rewritten setting in the Teams section. The recommended value is on (selected).

Note

When you turn on or turn off Safe Links protection for Teams, it might take up to 24 hours for the change to take effect.

Safe Links protection for Teams is supported in Teams desktop, web, and mobile (android and iOS) apps.

Websites opened from Teams might require re-authentication when SameSite=Strict cookies are required for authentication by the target page. This behavior occurs because the intermediary page that does Safe Links validation redirects to the target page, which is treated as a cross-site request. The same issue applies to links opened from Teams for Web with Safe Links disabled.

URLs in Teams are checked against a list of known malicious links when the protected user clicks the link (time-of-click protection). URLs aren't rewritten. If a link is found to be malicious, users have the following experiences:

If the user who sent the link isn't protected by a Safe Links policy where Teams protection is turned on, the user is free to click through to the original URL on their computer or device.

A Safe Links for Teams page reporting a malicious link

Clicking the Go Back button on the warning page returns the user to their original context or URL location. However, clicking on the original link again causes Safe Links to rescan the URL, so the warning page reappears.

At a high level, here's how Safe Links protection works for URLs in Microsoft Teams:

  1. A user starts the Teams app.
  2. Microsoft 365 verifies that the user's organization includes Microsoft Defender for Office 365, and that the user is included in an active Safe Links policy where protection for Microsoft Teams is turned on.
  3. URLs are validated at the time of click for the user in chats, group chats, channels, and tabs.

Safe Links protection for Office apps checks links in Office documents, not links in email messages. But, it can check links in attached Office documents in email messages after the document is opened.

You turn on or turn off Safe Links protection for Office apps in Safe Links policies. Specifically, you use the On: Safe Links checks a list of known, malicious links when users click links in Microsoft Office apps. URLs are not rewritten setting in the Office 365 apps section. The recommended value is on (selected).

Safe Links protection for Office apps has the following client requirements:

For more information about the recommended values for Standard and Strict policy settings, see Safe Links policy settings.

At a high level, here's how Safe Links protection works for URLs in Office apps. The supported Office apps are described in the previous section.

  1. A user signs in using their work or school account in an organization that includes Microsoft 365 Apps or Microsoft 365 Business Premium.
  2. The user opens and clicks on a link an Office document in a supported Office app.
  3. Safe Links immediately checks the URL before opening the target website:
    • If the URL points to a website that has been determined to be malicious, a malicious website warning page (or a different warning page) opens.
    • If the URL points to a downloadable file, and the Safe Links policy that applies to the user is configured to scan links to downloadable content (Apply real-time URL scanning for suspicious links and links that point to files), the downloadable file is checked.
    • If the URL is considered safe, the user is taken to the website.
    • If Safe Links scanning is unable to complete, Safe Links protection doesn't trigger. In Office desktop clients, the user is warned before they proceed to the destination website.

Note

It may take several seconds at the beginning of each session to verify that Safe Links for Office apps is available to the user.

These settings apply to Safe Links in email, Teams, and Office apps:

After you create multiple policies, you can specify the order that they're applied. No two policies can have the same priority, and policy processing stops after the first policy is applied (the highest priority policy for that recipient). The Built-in protection policy is always applied last. The Safe Links policies associated Standard and Strict preset security policies are always applied before custom Safe Links policies.

For more information about the order of precedence and how multiple policies are evaluated and applied, see Order of precedence for preset security policies and other policies and Order and precedence of email protection.

Note

Entries in the "Do not rewrite the following URLs" list aren't scanned or wrapped by Safe Links during mail flow, but might still be blocked at time of click. Report the URL as I've confirmed it's clean and then select Allow this URL to add an allow entry to the Tenant Allow/Block List so the URL isn't scanned or wrapped by Safe Links during mail flow and at time of click. For instructions, see Report good URLs to Microsoft.

Each Safe Links policy contains a Do not rewrite the following URLs list that you can use to specify URLs that aren't rewritten by Safe Links scanning. You can configure different lists in different Safe Links policies. Policy processing stops after the first (likely, the highest priority) policy is applied to the user. So, only one Do not rewrite the following URLs list is applied to a user who is included in multiple active Safe Links policies.

To add entries to the list in new or existing Safe Links policies, see Create Safe Links policies or Modify Safe Links policies.

Notes:

Entry syntax for the "Do not rewrite the following URLs" list

Examples of the values that you can enter and their results are described in the following table:

Value Result
contoso.com Allows access to https://contoso.com but not subdomains or paths.
*.contoso.com/* Allows access to a domain, subdomains, and paths (for example, https://www.contoso.com, https://www.contoso.com, https://maps.contoso.com, or https://www.contoso.com/a). This entry is inherently better than *contoso.com*, because it doesn't allow potentially fraudulent sites, like https://www.falsecontoso.com or https://www.false.contoso.completelyfalse.com
https://contoso.com/a Allows access to https://contoso.com/a, but not subpaths like https://contoso.com/a/b
https://contoso.com/a/\* Allows access to https://contoso.com/a and subpaths like https://contoso.com/a/b

This section contains examples of the various warning pages that are triggered by Safe Links protection when you click a URL.

Scan in progress notification

The clicked URL is being scanned by Safe Links. You might need to wait a few moments before trying the link again.

The notification that the link is being scanned

Suspicious message warning

The clicked URL was in an email message that's similar to other suspicious messages. We recommend that you double-check the email message before proceeding to the site.

Phishing attempt warning

The clicked URL was in an email message that has been identified as a phishing attack. As a result, all URLs in the email message are blocked. We recommend that you don't proceed to the site.

Malicious website warning

The clicked URL points to a site that has been identified as malicious. We recommend that you don't proceed to the site.

The warning that states that the website is classified as malicious

Error warning

Some kind of error has occurred, and the URL can't be opened.

The warning that states the page that you are trying to access cannot be loaded