Fixing 550 5.7.520 Access Denied: Your Organization Does Not Allow External Forwarding [PowerShell Runbook]
Immediate Fix
Microsoft 365 Defender’s Outbound Anti-Spam Policy has automatic external email forwarding blocked (
AutoForwardingMode: Off). When an Outlook rule or mailbox setting attempts to forward to an external address (Gmail, Yahoo, vendor), EOP drops the message with NDR 550 5.7.520.To Allow Specific Legitimate Users via PowerShell:
New-HostedOutboundSpamFilterPolicy -Name "Allow External Forwarding Exception" -AutoForwardingMode OnNew-HostedOutboundSpamFilterRule -Name "Allow Forwarding Rule" -HostedOutboundSpamFilterPolicy "Allow External Forwarding Exception" -SentBy "executive@domain.com"
When an end user sets up an Outlook Inbox rule or an administrator configures mailbox forwarding to an external address, the sender often receives an immediate Non-Delivery Report (NDR):
Remote server returned ‘550 5.7.520 Access denied, Your organization does not allow external forwarding. Please contact your administrator for more information.’
This security barrier is enforced by default in all Microsoft 365 tenants to stop Business Email Compromise (BEC) and data exfiltration. However, many legitimate enterprise workflows—such as forwarding notifications to external ticketing systems or executives forwarding to secondary accounts—require approved exceptions.
In this guide, we provide the exact, step-by-step resolution using both the Microsoft Defender Portal and Exchange Online PowerShell.
Method 1: Create an Exception Policy via PowerShell (Fastest)
Never disable anti-forwarding across your entire tenant. Instead, create a targeted outbound policy applied only to approved users.
Step 1: Connect to Exchange Online
Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com -ShowBanner:$false
Step 2: Create a Custom Outbound Spam Policy
New-HostedOutboundSpamFilterPolicy `
-Name "Policy - Allow Approved External Forwarding" `
-AutoForwardingMode On `
-AdminDisplayName "Permits external email forwarding for approved business accounts"
Step 3: Bind the Policy to Approved Users
New-HostedOutboundSpamFilterRule `
-Name "Rule - Approved External Forwarders" `
-HostedOutboundSpamFilterPolicy "Policy - Allow Approved External Forwarding" `
-SentBy "vendor-alerts@company.com", "service-desk@company.com"
Method 2: Configure via Microsoft Defender Portal (GUI)
- Navigate to Microsoft Defender Portal (
https://security.microsoft.com/). - Under Email & collaboration, click Policies & rules -> Threat policies -> Anti-spam.
- Click Create policy -> select Outbound.
- Name your policy (e.g. “Allow External Forwarding – Exceptions”).
- In the Users, groups, and domains section, add the specific user mailboxes requiring forwarding.
- Under Automatic forwarding rules, set Automatic forwarding rules to On – Forwarding is enabled.
- Review and click Create. Policy changes propagate across Exchange Online within 15–30 minutes.
Verification: Test Mail Flow
Once the policy rule is bound, trigger a test forward from the user’s mailbox to the external address. Run a real-time message trace to confirm delivery:
Get-MessageTrace -SenderAddress "user@company.com" -StartDate (Get-Date).AddMinutes(-30) | Select-Object Received, SenderAddress, RecipientAddress, Status, Subject
Status will now report Delivered or Expanded instead of Failed.
