The Complete Guide to Defender for Office 365: Protect Email and Files

Last update: 03/10/2025
Author Isaac
  • Email authentication with SPF, DKIM, DMARC, and ARC to stop spoofing at the source.
  • Standard/Strict policies with clear precedence and minimal adjustments for maximum effectiveness.
  • Safe Links/Attachments, user reporting, and AIR for rapid detection and response.

Security in Microsoft Defender for Office 365

If you use Microsoft 365Your email and files are a favorite target for attackers, so it's worth getting serious about security. Microsoft Defender for Office 365 adds key layers of protection about Exchange Online Protection, monitoring messages, links, attachments, and collaboration in OneDrive, SharePoint and Teams.

In this practical guide you will find a complete and actionable walkthrough: from email authentication (SPF, DKIM, DMARC) and pre-established Standard/Strict policies, to how to prioritize accounts, receive user reports, manage allow/block lists, launch phishing simulations, and respond to incidents. You'll also look at licensing, privacy, data retention, and Tricks to improve results without going crazy, like Prevent Microsoft Defender from blocking safe files.

Key requirements and permits

Defender Requirements and Permissions for Office 365

By default, Microsoft 365 already puts basic mail barriers in place with EOP, but Defender for Office 365 extends that protection with advanced features. To set it up smoothly, you'll need the proper permissions.

The easiest way to delegate is to assign the role of Security Administrator at Microsoft Enter to those who will be touching Defender for Office 365. If you prefer fine-grained permissions, you can use Exchange Online permissions or specific Email & Collaboration permissions in the Defender portal, but avoid giving the Global Administrator role to everyone and follows the principle of least privilege.

Step 1: Configure email authentication (SPF, DKIM, DMARC, and ARC)

SPF DKIM DMARC Authentication in Office 365

Before thinking about spam or malware, it is time to shield the origin. The Mail authentication confirms that messages are legitimate and have not been tampered with.You must apply these standards in this order for each custom domain that sends email from Microsoft 365.

  • SPF (TXT): Declare which hosts are allowed to send on behalf of your domain. Publish a correct SPF record to prevent impersonations and improve deliverability.
  • DKIM: outgoing signature that travels in the header and survives retransmissions. Activate it for your domains and use the CNAME keys that Microsoft 365 provides you.
  • DMARC: Indicates what to do if SPF/DKIM fails. Includes policy p=reject op=quarantine and recipients for aggregate and forensic reports, so your destination servers know what to expect.
  • ARC: If an intermediate service modifies incoming messages, log it as trusted ARC sealant to maintain traceability and ensure that origin authentication is not broken.

If you use the '*.onmicrosoft.com' domain as your email source, you've already done some of the work. SPF and DKIM are configured by default, but you'll need to manually create the DMARC record for that domain if you use it for sending.

Step 2: Threat policies and how they are applied

There are three conceptual layers in Defender for Office 365: default policies, preset security policies, and custom policiesUnderstanding the difference and precedence will save you a lot of trouble.

Types of available policies

  • Default directives: they live from the moment you create the tenant, always apply to all recipients and you can't change their scope (you can change their settings in some cases). They're your safety net.
  • Preset security policies: Closed profiles with Microsoft best practices, in two flavors: Standard y StrictIntegrated link and attachment protection is enabled by default; for Standard/Strict, you must enable it and define recipients and exceptions.
  • Custom directives: when you need specific settings (language/country blocking, custom quarantines, custom notifications), create as many as you need and you assign conditions by users, groups or domains.

The preset ones evolve automatically: If Microsoft strengthens a recommendation, the profile is updated And you benefit without touching anything. In Standard and Strict, you can only edit user and domain impersonation entries and exceptions; everything else is set to the recommended level.

  SysMenu.dll Error On Windows 10 | Solutions

Order of precedence

When a message or element is evaluated, The first applicable policy is the one that commands and the rest are no longer considered. In general, the order is:

  1. Preset security policies: first Strict, then Standard.
  2. Custom directives of that feature, ordered by priority (0, 1, 2…).
  3. Default policy (or integrated protection in the case of Safe Links/Attachments).

To avoid strange overlaps, use different target groups at each level and add exceptions in Strict/Standard for users you'll target with custom policies. Those who don't fall into higher levels will be protected by the default or built-in protection.

Recommended strategy

If there is no requirement that pushes you to customize, It starts with the Standard policy for the entire organization and Strict reserves for high-risk groups. It's simple, robust, and self-adjusts as threats change.

Step 3: Assign permissions to administrators without overdoing it

Even if your initial account has power for everything, It is not a good idea to give away the role of Global Admin to anyone who needs to work on security. As a rule, assign the Security Administrator role in Microsoft Access to administrators, specialists, and support who will be managing Defender for Office 365.

If you will only be managing email, you can choose Exchange Online permissions or the Email & Collaboration roles of the Defender portal. Minimum privilege, always to reduce risk surface.

Step 4: Priority Accounts and User Tags

Defender for Office 365 allows marking up to 250 users as priority accounts to highlight them in reports and research and apply additional heuristics. It's ideal for executives, finance, or IT.

With Plan 2 you also have custom user tags to group groups (suppliers, VIPs, departments) and filter analysis. Identify who should be tagged since the first day.

Step 5: Messages reported by users

Users raising their hands is golden: The false positives/negatives they report allow you to adjust policies and train Microsoft filters.

  • How they report: with the Report button integrated in Outlook (web/desktop) or with supported third-party tools that use the supported format; this is how they will appear in the Report tab of the Submissions user.
  • Where do they go?: by default to a designated mailbox already in Microsoft. You can change this to mailbox only (and manually forward to Microsoft) or only Microsoft. Create a dedicated mailbox for these reports; don't use the original account.

Sending reports to Microsoft helps filters learn fasterIf you opt for inbox-only, remember to send relevant emails for analysis from the Sending tab.

Step 6: Block and allow with a head

Tenant allow/block lists are powerful, but Abusing allowing opens unnecessary doors. Prevail with blocking and use temporary concessions only after thorough verification.

  • Block: add domains/emails, files and URLs in their corresponding tabs or send items to Microsoft from Sendings to have the entry created automatically. Spoofing Intelligence displays blocked/allowed senders; you can change decisions or create proactive entries.
  • Allow: You can allow domains/emails and URLs to override verdicts of bulk, spam, high-confidence spam, or non-high-confidence phishing. Malware cannot be directly allowed or URLs/domains marked as high confidence phishing; in those cases, submit from Submissions and mark 'I have confirmed that it is clean' to create a temporary exception.

Watch out for exceptions: review them and expire them when they are no longer needed. You will prevent what shouldn't happen due to historical permissiveness.

Step 7: Phishing Simulations and Training

With Attack Simulation Training (Plan 2) you can launch realistic impersonation campaigns and assign training based on the user's response. Touch on credentials, QR phishing, dangerous attachments, or BEC to cover the spectrum.

  Fix: "Please insert Windows recovery media or installation media" error

The telemetry of these campaigns reveals risky behaviors and helps plan reinforcements. Ideally, runs quarterly simulations to keep the pulse.

Step 8: Research and respond without wasting time

When an alert is triggered, the goal is clear: understand the scope and remedy quicklyDefender for Office 365 gives you two key advantages in your everyday work.

  • Threat Explorer: Filter by malware, phish or detected URLs, use the campaign view to see all affected messages and apply bulk actions (Soft delete/Purge) on compromised messages.
  • Automatic Investigation and Response (AIR) in Plan 2: initiates investigations, isolates messages, analyzes links, relates mailboxes and proposes or executes remediation.

Plus, Zero-hour Auto Purge (ZAP) may withdraw mail after delivery if it is re-sorted, which reduce exposure window if something is later re-evaluated as malicious.

Protecting OneDrive, SharePoint, and Teams

Mail is the gateway, but files are the loot. Extends protection to OneDrive, SharePoint, and Teams to cut infections and filter malicious content in collaboration.

  • Antimalware in files: Sandbox attachment analysis and detonation with Safe Attachments, including Dynamic Delivery so as not to stop reading the message while inspecting the file. Also learn how to check a downloaded file.
  • Safe Links: Real-time URL rewriting and analysis in emails, documents, and Teams; you can prevent click-through to block ignore warnings.
  • DLP and sensitivity labels (Purview): Prevents sensitive data leaks and applies encryption/controls by level of sensitivity, even outside the organization, or learn to hide and protect confidential emails.

Complements with Microsoft Defender for Cloud Apps to Discover Shadow IT, apply policies in real time and detect anomalies (ransomware, malicious apps) in cloud services, both Microsoft and third-party.

Licensing and quick activation

Defender for Office 365 is available in two plans: P1 (Safe Links, Safe Attachments and advanced anti-phishing) and P2 (adds Threat Explorer, AIR and simulations). E5 includes P2; with E3 you can add P1 or P2 as needed.

Functionality EOP extension (inside Solna Centrum) (inside Solna Centrum)
Standard antispam/antimalware
Safe Links
Safe Attachments
Antiphishing with IA
Threat Explorer / AIR
Attack Simulation

To activate it, go to Microsoft 365 Defender, go to Email & Collaboration > Policies & Rules and enable Standard/Strict. Assign the scope (users, groups, domains) and define exceptions where appropriate.

PowerShell shortcut for antiphishing

# Conecta al módulo de Exchange Online
Connect-ExchangeOnline

# Crea política y regla de Anti-Phish básicas
New-AntiPhishPolicy -Name 'AntiPhishCorp' \
 -EnableMailboxIntelligence $true \
 -EnableDomainImpSpoofProtection $true \
 -EnableUserImpSpoofProtection $true

New-AntiPhishRule -Name 'AntiPhishCorpRule' \
 -AntiPhishPolicy 'AntiPhishCorp' -RecipientDomainIs 'midominio.com'

Remember that with Dynamic Delivery in Safe Attachments The user receives the message body instantly, and the attachment is released after the trigger; this improves the experience without sacrificing security.

Best practices, Zero Trust and integration

To strengthen your posture, apply these guidelines. They don't require magic, just perseverance. and practical judgment.

  • DMARC with p=quarantine/reject and DKIM on all domains to stop spoofing.
  • Review Secure Score semi-annually and aims for ≥ 75%. Implement relevant recommendations.
  • Monitor false positives in quarantine and adjust without over-allowing. Less is more.
  • Quarterly simulations to truly raise awareness among the end user.
  • Integrate with Microsoft Sentinel If you have SIEM, for multi-domain correlation and SOAR automation.
  • Document exemptions (for example, third parties sending unusual attachments) and review them quarterly.

Within a strategy Zero Trust, Defender for Office 365 covers email and collaboration; adds Defender for Endpoint to slow down lateral movement and respond on the device, and lean on SmartScreen to stop websites and downloads dangerous on the endpoint, in addition to configuring mobile device management (MDM).

Data and privacy in Defender for Office 365

When processing email and Teams messages, Microsoft 365 handles metadata such as display names, email addresses, IP addresses and domains. They are used for offline ML, reputation, and capabilities like ZAP. For additional layers, consider Protect your email with Shielded Email.

  Microsoft Office Formats: What They Are and When to Use Each One

All reports are subject to identifiers EUPI (pseudonyms) and EUII, with these guarantees: data is shared only within your organization, stored in your region and only authorized users have accessEncryption at rest is enforced using ODL and CDP.

Data location

Defender for Office 365 operates in Microsoft Entra datacenters. For certain geographies, data at rest for provisioned organizations is stored only in their region. Regions with local residence include:

  • Australia
  • Brazil
  • Canada
  • European Union
  • France
  • German
  • India
  • Israel
  • Italy
  • Japan
  • Norway
  • Poland
  • Qatar
  • Singapore
  • South Africa
  • South Korea
  • Sweden
  • Switzerland
  • United Arab Emirates
  • United Kingdom
  • United States

Among the data stored at rest in the local region (default protections in cloud mailboxes and in Defender for Office 365) are alerts, attachments, block lists, email metadata, analytics, spam, quarantines, reports, policies, spam domains and URLs.

Retention and sharing

Defender for Office 365 data is retained 180 days in reports and records. Extracted personal information is encrypted and automatically deleted 30 days after the retention period. At the end of licenses and grace periods, the data is irretrievably deleted no later than 190 days after the end of the subscription.

Defender for Office 365 shares data with Microsoft 365 Defender XDR, Microsoft Sentinel, and audit logs (if licensed by the customer), with specific exceptions for GCC government clouds.

Ransomware Recovery in Microsoft 365

If, despite everything, something slips through, act quickly: Stop OneDrive syncing and isolate compromised computers to preserve healthy copies. Then take advantage of the native options.

  • Version control: Save multiple versions to SharePoint, OneDrive, and Exchange. You can set up to 50.000, but be careful: Some ransomware encrypts all versions and the storage extra account.
  • Recycle Bin: Restores items deleted during 93 daysAfter that period and the two trash phases, you can ask Microsoft up to 14 additional days for recovery.
  • Retention policies (E5/A5/G5): defines how long to keep and what can be deleted; automates withholdings by content types.
  • Preservation Hold Library: With active holds, an immutable copy is saved to OneDrive/SharePoint; allows you to extract intact files after the incident.
  • Third-party backups: Microsoft does not do backup traditional backup of your M365 content; consider a SaaS backup solution for Demanding RTO/RPO and granular recovery, or learn to back up your emails.

To reduce input vectors remember to combine email protections (EOP + Defender), multi-factor authentication, attack surface reduction rules, and Exchange settings that reduce the risk of phish and spoof.

With all of the above in place, your Microsoft 365 environment is noticeably more robust: Authenticated email, consistent policies with clear precedence, secure collaboration, reporting users, educational simulations, and real investigation and response capabilities. Top it off with periodic reviews, Secure Score, and minimal exemptions, and you'll have a system that stands up to modern campaigns without sacrificing usability.

What to look for to detect phishing or malware emails
Related article:
How to detect phishing or malware emails: a complete guide