Fix Exchange Online 550 5.1.8: Access Denied, Bad Outbound Sender

Why Exchange Online returns 550 5.1.8 Access denied, bad outbound sender, how to secure the likely compromised account first, unblock it on the Restricted entities page or in PowerShell, and set outbound spam limits and alerts.

Home › Guides › Exchange Online 5.1.8

Last updated 17 November 2026

Quick answer

Microsoft documents the full NDR as:

Your message couldn't be delivered because you weren't recognized as a valid sender. The most common reason for this is that your email address is suspected of sending spam and it's no longer allowed to send email. Contact your email admin for assistance. Remote Server returned 550 5.1.8 Access denied, bad outbound sender.

The account went over the sending limits of the service or the limits in an outbound spam policy, so Exchange Online restricted it from sending. It can still receive mail. The account is added to the Restricted entities page in the Microsoft Defender portal, and Microsoft's NDR reference says this typically happens because the account was compromised (hacked) by phishing or malware.

The fix has two parts, in this order:

  1. Secure the account (Microsoft: a sender exceeding the outbound limits is an indicator of a compromised account).
  2. Unblock it on the Restricted entities page or with Remove-BlockedSenderAddress. Restrictions are usually removed within one hour.

A user who gets this bounce should check whether their account is compromised and tell their admin. Only an admin can remove the block.

Why Exchange Online restricted the account

Every outbound message is scanned for spam. Microsoft blocks an account from sending when it passes an undisclosed limit for spam, or an overall outbound message limit regardless of the spam verdict. Microsoft doesn't publish those exact limits. The published per-user limits and the limits you can set yourself are:

LimitValue (Microsoft Learn)
Recipient rate limit10,000 recipients per day (24-hour sliding window)
Message rate limit30 messages per minute
Tenant External Recipient Rate Limit (TERRL)Per tenant, scales with licenses; trial tenants 5,000 external recipients per day; NDR 550 5.7.233
Outbound spam policy limits (yours)External and internal recipients per hour and total recipients per day, 0 to 10000 (0 = service defaults)

Common signs of a compromised mailbox from Microsoft's list: the mailbox is blocked from sending, suspicious Inbox rules (forwarding to unknown addresses, moving mail to Notes, Junk Email or RSS Subscriptions), odd messages in Sent Items or Deleted Items, recently added external forwarding, unexplained lockouts or password changes, changed GAL contact details and suspicious signatures.

Step 1: Secure the account before you unblock it

Microsoft's steps for a compromised cloud email account, in order:

  1. Disable the account during the investigation (preferred). With Microsoft Graph PowerShell:
    Connect-MgGraph -Scopes "User.ReadWrite.All"
    $user = Get-MgUser -Search UserPrincipalName:'<UPN>' -ConsistencyLevel Eventual
    Update-MgUser -UserId $user.Id -AccountEnabled $false
    If you can't disable it, reset the password. Don't send the new password by email (the attacker may be reading the mailbox), don't reuse any of the last five passwords, reset it twice in Active Directory if the account is synced, and change it on-premises if the identity is federated. App passwords aren't revoked by a reset: delete and recreate them. Enable and enforce MFA.
  2. Revoke sessions so stolen tokens stop working:
    Connect-MgGraph -Scopes User.RevokeSessions.All
    Revoke-MgUserSignInSession -UserId <UPN>
  3. Review MFA methods and devices and remove any the user doesn't recognize.
  4. Review application consents and revoke apps that shouldn't be there.
  5. Review admin roles assigned to the user and remove any that shouldn't be there.
  6. Review mail forwarding in Exchange Online PowerShell:
    Get-Mailbox -Identity <Identity> | Format-List Forwarding*Address,DeliverTo*
    Get-InboxRule -Mailbox <Identity> -IncludeHidden | Format-List Name,Enabled,RedirectTo,Forward*,Identity
    A nonblank ForwardingSmtpAddress forwards to an external recipient; check every rule with RedirectTo, ForwardTo or ForwardAsAttachmentTo.

Then investigate: Microsoft Entra sign-in logs (IP address, location, time, success or failure), the audit log from just before the suspicious activity, and message trace for what the account sent. Microsoft also offers a Compromised Accounts diagnostic (Run Tests) to spot suspicious account activity. If you disabled the account, reset the password and enable it again when you're done.

Step 2: Unblock the user

In the Microsoft Defender portal

  1. Optional but recommended: run the Blocked Sender History self-help diagnostic to see the listing and delisting history and the sender's MFA status.
  2. Go to Email & collaboration > Review > Restricted entities at security.microsoft.com.
  3. Find the account (its Entity value is Mailbox), select its check box and choose Unblock.
  4. In the Unblock user flyout, read the Overview and work through the Recommendations, then select Next.
  5. On the Unblock user page, use the Multi-factor authentication and Change password links if you haven't done those steps, then select Submit and confirm with Yes.

You need the Organization Management or Security Administrator role group in Exchange Online (Global Reader, Security Reader and View-Only Organization Management can only view the page), or the matching Microsoft Entra or Defender XDR unified RBAC permissions.

In Exchange Online PowerShell

Get-BlockedSenderAddress
Get-BlockedSenderAddress -SenderAddress <emailaddress> | Format-List
Remove-BlockedSenderAddress -SenderAddress <emailaddress>

For a cloud mailbox the identifier is the user principal name, which doesn't have to match the primary SMTP address. A nonhosted sender (for example an on-premises sender) is listed by its sending SMTP address.

How long it takes

Under most circumstances all restrictions are removed within one hour. Microsoft says transient issues can make it longer, but no longer than 24 hours in total.

Step 3: Outbound spam limits and alerts

Outbound spam policies are at Email & collaboration > Policies & rules > Threat policies > Anti-spam (Create policy > Outbound for a new one). The Restriction placed on users who reach the message limit setting decides what happens:

Portal settingPowerShell valueWhat happens
Restrict the user from sending mail until the following dayBlockUserForToday (default)Notifications are sent and the user can't send until the following day, based on UTC time.
Restrict the user from sending mailBlockUserThe user is added to Restricted users and can't send until an admin removes them. After removal, the user won't be restricted again for that day.
No action, alert onlyAlertThe Email sending limit exceeded alert notifies admins.

Microsoft's example for the default policy:

Set-HostedOutboundSpamFilterPolicy -Identity Default -RecipientLimitExternalPerHour 500 -RecipientLimitInternalPerHour 1000 -RecipientLimitPerDay 1000 -ActionWhenThresholdReached BlockUser

The default alert policy User restricted from sending email emails the TenantAdmins group (Global Administrator members) when a user is blocked. Check its recipients under Email & collaboration > Policies & rules > Alert policy. Alerts need audit logging, which is on by default. Microsoft recommends the alert policy over the notification settings inside outbound spam policies. Email sending limit exceeded and Suspicious email sending patterns detected are default alerts too.

If the account was blocked because of a legitimate mass mailing: Microsoft says bulk email through Microsoft 365 isn't a supported use of the service. Use Azure Communication Services Email, a non-Microsoft bulk email provider or your own servers, preferably from a subdomain with its own SPF, DKIM and DMARC (see the bulk sender guide).

Related Exchange Online codes

CodeText in Microsoft's NDR referenceMeaning
5.1.8Access denied, bad outbound senderThis guide: account restricted from sending.
5.1.90Your message can't be sent because you've reached your daily limit for message recipientsRecipient rate limit; could indicate a compromised account.
5.2.2Submission quota exceededRecipient or message rate limit; see the 5.2.2 guide.
5.7.233Your message can't be sent because your tenant exceeded its daily limit for sending email to external recipients (tenant external recipient rate limit)Tenant-wide external recipient limit (TERRL).
5.7.501, 5.7.502, 5.7.503Access denied, spam abuse detected / Access denied, banned senderAccount banned for spam activity; see the 5.7.501 to 5.7.503 guide.
5.7.708Access denied, traffic not accepted from this IPTenant-level block; see the 5.7.708 guide.

Audit hundreds of domains at once

Need SPF, DMARC and MX checks across a whole client list? Run the Bulk SPF / DMARC / MX Auditor on Apify ($2 per 1,000 domains).

Related tools and guides

Check your sending domain with the Email Deliverability Checker, SPF Record Checker and DMARC Record Checker, confirm the tenant with the M365 Tenant Lookup, read the NDR in the Email Header Analyzer and keep cmdlets in the PowerShell Cheat Sheet. Related guides: Exchange Online 5.7.501 to 5.7.503, Exchange Online 5.2.2, Exchange Online 550 5.7.708, Exchange Online 550 5.7.520 and bulk sender requirements.

FAQ

What does 550 5.1.8 Access denied, bad outbound sender mean?

Exchange Online restricted the sending account because it exceeded the sending limits of the service or of an outbound spam policy. The account can still receive mail, appears on the Restricted entities page in the Microsoft Defender portal, and in most cases was compromised by phishing or malware.

How do I unblock a user who gets 5.1.8?

Secure the account first, then open the Restricted entities page in the Microsoft Defender portal (under Email & collaboration, Review), select the mailbox and choose Unblock. In Exchange Online PowerShell, run Remove-BlockedSenderAddress -SenderAddress with the user principal name.

How long does it take after unblocking?

Microsoft says all restrictions are usually removed within one hour. Transient technical issues can make it take longer, but the total wait should be no longer than 24 hours.

Should I unblock the account right away?

No. Microsoft treats exceeding outbound limits as an indicator of compromise. Disable the account or reset the password, revoke sessions, enable MFA, and check MFA methods, app consents, admin roles, forwarding and Inbox rules before you remove the block, or it can be blocked again.

Can I change when Exchange Online blocks a user?

Yes, within limits. Outbound spam policies set external and internal recipients per hour and recipients per day (0 to 10000, 0 means the service defaults) and the action: block until the following day (default), block until an admin removes the user, or alert only. The service limits and the undisclosed spam limits still apply.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.