Turn on Safe Attachments for SharePoint, OneDrive, and Microsoft Teams - Microsoft Defender for Office 365 (2024)

  • Article
  • Applies to:
    Microsoft Defender for Office 365 Plan 1 and Plan 2, ✅ Microsoft Defender XDR

Tip

Did you know you can try the features in Microsoft Defender XDR for Office 365 Plan 2 for free? Use the 90-day Defender for Office 365 trial at the Microsoft Defender portal trials hub. Learn about who can sign up and trial terms here.

In organizations with Microsoft Defender for Office 365, Safe Attachments for Office 365 for SharePoint, OneDrive, and Microsoft Teams protects your organization from inadvertently sharing malicious files. For more information, see Safe Attachments for SharePoint, OneDrive, and Microsoft Teams.

You turn on or turn off Safe Attachments for Office 365 for SharePoint, OneDrive, and Microsoft Teams in the Microsoft Defender portal or in Exchange Online PowerShell.

What do you need to know before you begin?

  • You open the Microsoft Defender portal at https://security.microsoft.com. To go directly to the Safe Attachments page, use https://security.microsoft.com/safeattachmentv2.

  • You open the Microsoft Defender portal at https://security.microsoft.com. To go directly to the Safe Attachments page, use https://security.microsoft.com/safeattachmentv2.

  • To connect to Exchange Online PowerShell, see Connect to Exchange Online PowerShell.

  • To turn on Safe Attachments for SharePoint, OneDrive, and Microsoft Teams, you need to be a member of the Organization Management or Security Administrator role groups in the Microsoft Defender portal. For more information, see Permissions in the Microsoft Defender portal.

  • To use SharePoint Online PowerShell to prevent people from downloading malicious files, you need to be member of the Global Administrator or SharePoint Administrator roles in Microsoft Entra ID.

  • Verify that audit logging is enabled for your organization (it's on by default). For instructions, see Turn auditing on or off.

  • Allow up to 30 minutes for the settings to take effect.

  1. In the Microsoft Defender portal at https://security.microsoft.com, go to Policies & rules > Threat policies > Safe Attachments in the Policies section. Or, to go directly to the Safe Attachments page, use https://security.microsoft.com/safeattachmentv2.

  2. On the Safe Attachments page, select Turn on Safe Attachments for SharePoint, OneDrive, and Microsoft Teams - Microsoft Defender for Office 365 (1) Global settings.

  3. In the Global settings flyout that opens, go to the Protect files in SharePoint, OneDrive, and Microsoft Teams section.

    Move the Turn on Defender for Office 365 for SharePoint, OneDrive, and Microsoft Teams toggle to the right Turn on Safe Attachments for SharePoint, OneDrive, and Microsoft Teams - Microsoft Defender for Office 365 (2) to turn on Safe Attachments for SharePoint, OneDrive, and Microsoft Teams.

    When you're finished in the Global settings flyout, select Save.

If you'd rather use PowerShell to turn on Safe Attachments for SharePoint, OneDrive, and Microsoft Teams, connect to Exchange Online PowerShell and run the following command:

Set-AtpPolicyForO365 -EnableATPForSPOTeamsODB $true

For detailed syntax and parameter information, see Set-AtpPolicyForO365.

By default, users can't open, move, copy, or share* malicious files that are detected by Safe Attachments for SharePoint, OneDrive, and Microsoft Teams. However, they can delete and download malicious files.

* If users go to Manage access, the Share option is still available.

To prevent users from downloading malicious files, connect to SharePoint Online PowerShell and run the following command:

Set-SPOTenant -DisallowInfectedFileDownload $true

Notes:

  • This setting affects both users and admins.
  • People can still delete malicious files.

For detailed syntax and parameter information, see Set-SPOTenant.

Step 3 (Recommended) Use the Microsoft Defender portal to create an alert policy for detected files

You can create an alert policy that notifies admins when Safe Attachments for SharePoint, OneDrive, and Microsoft Teams detects a malicious file. To learn more about alert policies, see Alert policies in the Microsoft Defender portal.

  1. In the Microsoft Defender portal at https://security.microsoft.com, go to Policies & rules > Alert policy. To go directly to the Alert policy page, use https://security.microsoft.com/alertpolicies.

  2. On the Alert policy page, select Turn on Safe Attachments for SharePoint, OneDrive, and Microsoft Teams - Microsoft Defender for Office 365 (3) New alert policy to start the new alert policy wizard.

  3. On the Name your alert, categorize it, and choose a severity page, configure the following settings:

    • Name: Type a unique and descriptive name. For example, Malicious Files in Libraries.
    • Description: Type an optional description. For example, Notifies admins when malicious files are detected in SharePoint Online, OneDrive, or Microsoft Teams.
    • Severity: Select Low, Medium, or High from the dropdown list.
    • Category: Select Threat management from the dropdown list.

    When you're finished on the Name your alert, categorize it, and choose a severity page, select Next.

  4. On the Choose an activity, conditions and when to trigger the alert page, configure the following settings:

    • What do you want to alert on? section > Activity is > Common user activities section > Select Detected malware in file from the dropdown list.
    • How do you want the alert to be triggered? section: Select Every time an activity matches the rule.

    When you're finished on the Choose an activity, conditions and when to trigger the alert page, select Next.

  5. On the Decide if you want to notify people when this alert is triggered page, configure the following settings:

    • Verify Opt-in for email notifications is selected. In the Email recipients box, select one or more global administrators, security administrators, or security readers who should receive notification when a malicious file is detected.
    • Daily notification limit: Leave the default value No limit selected.

    When you're finished on the Decide if you want to notify people when this alert is triggered page, select Next.

  6. On the Review your settings page, review your settings. You can select Edit in each section to modify the settings within the section. Or you can select Back or the specific page in the wizard.

    In the Do you want to turn the policy on right away? section, select Yes, turn it on right away.

    When you're finished n the Review your settings page, select Submit.

  7. On this page, you can review the alert policy in read-only mode.

    When you're finished, select Done.

    Back on the Alert policy page, the new policy is listed.

Use Security & Compliance PowerShell to create an alert policy for detected files

If you'd rather use PowerShell to create the same alert policy as described in the previous section, and run the following command:

New-ActivityAlert -Name "Malicious Files in Libraries" -Description "Notifies admins when malicious files are detected in SharePoint Online, OneDrive, or Microsoft Teams" -Category ThreatManagement -Operation FileMalwareDetected -NotifyUser "admin1@contoso.com","admin2@contoso.com"

Note: The default Severity value is Low. To specify Medium or High, include the Severity parameter and value in the command.

For detailed syntax and parameter information, see New-ActivityAlert.

How do you know these procedures worked?

  • To verify that you've successfully turned on Safe Attachments for SharePoint, OneDrive, and Microsoft Teams, use either of the following steps:

    • In the Microsoft Defender portal, go to Policies & rules > Threat Policies > Policies section > Safe Attachments, select Global settings, and verify the value of the Turn on Defender for Office 365 for SharePoint, OneDrive, and Microsoft Teams setting.

    • In Exchange Online PowerShell, run the following command to verify the property setting:

      Get-AtpPolicyForO365 | Format-List EnableATPForSPOTeamsODB

      For detailed syntax and parameter information, see Get-AtpPolicyForO365.

  • To verify that you've successfully blocked people from downloading malicious files, open SharePoint Online PowerShell, and run the following command to verify the property value:

    Get-SPOTenant | Format-List DisallowInfectedFileDownload

    For detailed syntax and parameter information, see Get-SPOTenant.

  • To verify that you've successfully configured an alert policy for detected files, use either of the following methods:

    • In the Microsoft Defender portal at https://security.microsoft.com/alertpolicies, select the alert policy, and verify the settings.

    • In Security & Compliance PowerShell, replace <AlertPolicyName> with the name of the alert policy, run the following command, and verify the property values:

      Get-ActivityAlert -Identity "<AlertPolicyName>"

      For detailed syntax and parameter information, see Get-ActivityAlert.

  • Use the Threat protection status report to view information about detected files in SharePoint, OneDrive, and Microsoft Teams. Specifically, you can use the View data by: Content > Malware view.

Turn on Safe Attachments for SharePoint, OneDrive, and Microsoft Teams - Microsoft Defender for Office 365 (2024)

FAQs

Turn on Safe Attachments for SharePoint, OneDrive, and Microsoft Teams - Microsoft Defender for Office 365? ›

In the Microsoft Defender portal, go to Policies & rules > Threat Policies > Policies section > Safe Attachments, select Global settings, and verify the value of the Turn on Defender for Office 365 for SharePoint, OneDrive, and Microsoft Teams setting.

What are safe attachments in defender for Office 365? ›

Safe Attachments in Microsoft Defender for Office 365 provides an additional layer of protection for email attachments that have already been scanned by anti-malware protection in Exchange Online Protection (EOP).

How do I turn off safe attachments in Office 365? ›

Below are the steps to set up a mail flow rule to bypass Safe Attachments Processing:
  1. Create a new mail flow rule in your Microsoft 365 Exchange admin center.
  2. Give the rule a name such as Bypass Safe Attachments.
  3. Click more options.
  4. From the Apply this rule if… ...
  5. Enter our IP addresses. ...
  6. From the Do the following…

How do I turn on Microsoft Defender for Office 365 for SharePoint? ›

Sign in to the security center's safe attachments configuration page. Select Global settings. Ensure that Turn on Defender for Office 365 for SharePoint, OneDrive, and Microsoft Teams is set to on. Select Save.

Why do I need Microsoft Defender for Office 365? ›

In a hybrid deployment, Defender for Office 365 can be configured to protect your messaging environment and control mail routing when you have a mix of on-premises and cloud mailboxes with Exchange Online Protection for inbound email filtering.

How do I turn on safe attachments for SharePoint OneDrive and Microsoft teams? ›

In the Microsoft Defender portal, go to Policies & rules > Threat Policies > Policies section > Safe Attachments, select Global settings, and verify the value of the Turn on Defender for Office 365 for SharePoint, OneDrive, and Microsoft Teams setting.

Is Microsoft Defender enough protection? ›

Is Microsoft Defender enough for Windows? Yes, Microsoft Defender is a good antivirus for basic protection against malware. A reliable third-party antivirus, like TotalAV, will offer much better security features that Windows Defender doesn't have.

Is Microsoft Defender included in Microsoft 365? ›

Microsoft 365 Personal and Family subscribers can get started now. Microsoft Defender is available for download with a Microsoft 365 Personal or Family subscription.

How do I enable safe links in 365? ›

To enable the ATP Safe Links policy for Office, use the Microsoft 365 Admin Center: Under Admin centers click Security. Select Safe Links followed by Global Settings. Select Use Safe Links in Office 365 apps and Do not let users click through to the original URL in Office 365 apps.

How do I turn on safe documents for office client? ›

On the Safe Attachments page, select Global settings. In the Global settings flyout that opens, confirm or configure the following settings: Turn on Safe Documents for Office clients: Move the toggle to the right to turn on the feature: .

Does Microsoft Defender scan SharePoint? ›

Defender for Office 365 doesn't scan every single file in SharePoint Online, OneDrive for Business, or Microsoft Teams. This behavior is by design. Files are scanned asynchronously. The process uses sharing and guest activity events along with smart heuristics and threat signals to identify malicious files.

What is the difference between defender for endpoint and defender for Office 365? ›

Microsoft Defender for Office 365 is a cloud-based product offering protection against email threats and safeguarding files stored in the cloud. Microsoft Defender for Endpoint provides cybersecurity against malware, spyware and other malicious software.

Why is SharePoint not available in Office 365? ›

This probably means that the license of your company is not enough for showing this option. It might also be that your Office version is insufficient. You should get in contact with the SharePoint administrator and ask for a solution.

How much does Defender for Office 365 cost? ›

Microsoft Defender for Office 365 Pricing Overview
NamePrice
Microsoft Defender for Office Plan 1$2.001 User Per Month
Microsoft Defender for Office 365 Plan 2$5.001 User Per Month
Oct 4, 2022

What is the difference between Windows Defender and Microsoft Defender? ›

Windows Defender is the desktop security client default for Microsoft Windows OS and other OSes. Microsoft Defender is a broader suite of security tools that includes Windows Defender for Endpoint (a variant of Windows Defender) that is used for enterprise security particularly for Microsoft 365 licensees.

Should I enable Microsoft Defender? ›

Not only is Microsoft Defender Antivirus an excellent next-generation antivirus solution, but combined with other Defender for Endpoint capabilities, such as endpoint detection and response and automated investigation and remediation, you get better protection that's coordinated across products and services.

What are safe attachments? ›

Safe Links and Safe Attachments are designed to protect staff from email phishing attempts, and links/web sites or email attachments that contain malicious software. The service will mostly be invisible to you because it works behind the scenes to protect you.

What are safe links and attachments in M365? ›

Safe Links checks every URL found in supported M365 applications such as Word, Excel and PowerPoint documents. If the link you click is determined to be safe to view, the link will work as expected. If the link is determined to contain malicious content, a warning will be displayed.

What is the difference between safe attachments block and replace? ›

Replace – Delivers the messages but blocks the malware-containing attachments and notifies the recipient about the malware attachments. Block – Blocks all the messages from the sender once the malware is detected.

What is the difference between safe attachments block and dynamic delivery? ›

Block: This option prevents delivery of messages with malware attachments, guarding against recurring attacks. Dynamic Delivery: It enables quick message delivery with attachment placeholders until Safe Attachments scanning finishes.

Top Articles
Latest Posts
Article information

Author: Tyson Zemlak

Last Updated:

Views: 6549

Rating: 4.2 / 5 (43 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Tyson Zemlak

Birthday: 1992-03-17

Address: Apt. 662 96191 Quigley Dam, Kubview, MA 42013

Phone: +441678032891

Job: Community-Services Orchestrator

Hobby: Coffee roasting, Calligraphy, Metalworking, Fashion, Vehicle restoration, Shopping, Photography

Introduction: My name is Tyson Zemlak, I am a excited, light, sparkling, super, open, fair, magnificent person who loves writing and wants to share my knowledge and understanding with you.