A sender writes to one of your groups or shared mailboxes and gets a bounce that says the delivery wasn't authorized. Exchange Online is doing what it was told: something in your configuration doesn't allow that sender to reach that recipient. In this post I'll show how to read the NDR to find which restriction fired, fix it with the right setting or cmdlet, and confirm delivery with message trace.
Errors this guide fixes
Delivery not authorized, message refusedNDRTRANSPORT.RULES.RejectMessage; the message was rejected by organization policyNDR (diagnostic information)550 5.7.133 RESOLVER.RST.SenderNotAuthenticatedForGroup; authentication requiredNDR / message trace550 5.7.1 RESOLVER.RST.AuthRequired; authentication required [Stage: CreateMessage]NDR (diagnostic information)5.7.124 Sender not in allowed-senders listNDR5.7.134 Sender was not authenticated for mailboxNDR
Symptoms#
The sender's non-delivery report (NDR) carries a 5.7.x code. Microsoft's 5.7.1 guidance applies to the whole 5.7.0 to 5.7.999 range, and the text after the code tells you which control fired. These are the lines you are most likely to see:
Delivery not authorized, message refused
TRANSPORT.RULES.RejectMessage; the message was rejected by organization policy
550 5.7.133 RESOLVER.RST.SenderNotAuthenticatedForGroup; authentication required; Delivery restriction check failed because the sender was not authenticated when sending to this group
550 5.7.1 RESOLVER.RST.AuthRequired; authentication required [Stage: CreateMessage]Delivery not authorized, message refusedis the default text of a mail flow rule that rejects with an enhanced status code. Admins report the diagnostic line then containsTRANSPORT.RULES.RejectMessage.- Microsoft's NDR reference lists specific codes for sender restrictions:
5.7.12 Sender was not authenticated by organization,5.7.124 Sender not in allowed-senders list,5.7.133for groups,5.7.134 Sender was not authenticated for mailbox,5.7.136for mail users and5.7.13or5.7.135for public folders. - For a mail-enabled public folder, an external sender gets the
RESOLVER.RST.AuthRequiredline shown above. - When the block sits on a nested group, the NDR names the restricted group, which isn't always the group the sender addressed.
Why it happens#
| Cause | Setting behind it | Typical sign |
|---|---|---|
| Only listed senders may send | AcceptMessagesOnlyFromSendersOrMembers | 5.7.124 (groups) |
| Only internal (authenticated) senders may send | RequireSenderAuthenticationEnabled | 5.7.12, 5.7.133, 5.7.134, 5.7.136, AuthRequired |
| Sender explicitly blocked | RejectMessagesFromSendersOrMembers | 5.7.x restriction NDR |
| Moderation rejected or not approved | ModerationEnabled, ModeratedBy | Rejection notice instead of delivery |
| Mail flow rule rejects the message | Reject action on a rule | Delivery not authorized, message refused; 5.7.1 or 5.7.900-5.7.999 |
A few situations catch admins out. First, groups with more than 5,000 members automatically require moderator approval, and Microsoft's 5.7.124 article adds that senders must be members. Second, a colleague can count as "external": a message that leaves Exchange Online and comes back through an inbound connector, for example via a cloud signature service, can arrive unauthenticated and trip RequireSenderAuthenticationEnabled. Depending on the group's settings, even its owner may need to be on the allowed senders list.
How to fix it#
- Read the NDR and the trace. In Diagnostic information for administrators, note the full code and which server rejected the message: the remote server listed under the recipient, or the generating server if none is listed. If that isn't a Microsoft 365 server, the recipient's organization rejected the message, so only its admins can fix it. Then open the failed message in message trace: the detail shows the same reason, and a mail flow rule that acted on the message usually appears as its own event.
PowerShell
Connect-ExchangeOnline Get-MessageTraceV2 -RecipientAddress sales@contoso.com -StartDate (Get-Date).AddDays(-2) -EndDate (Get-Date) -Status Failed | Select-Object -First 1 | Get-MessageTraceDetailV2 | Format-List Date, Event, Detail - Inspect the recipient's delivery restrictions.
PowerShell
Get-DistributionGroup -Identity sales@contoso.com | Format-List RequireSenderAuthenticationEnabled, AcceptMessagesOnlyFromSendersOrMembers, RejectMessagesFromSendersOrMembers, ModerationEnabled, ModeratedBy Get-Mailbox -Identity info@contoso.com | Format-List RequireSenderAuthenticationEnabled, AcceptMessagesOnlyFromSendersOrMembers, RejectMessagesFromSendersOrMembers Get-UnifiedGroup -Identity project@contoso.com | Format-List RequireSenderAuthenticationEnabled, AcceptMessagesOnlyFromSendersOrMembers - Allow the sender with the narrowest change. To accept outside mail on a distribution group, set
RequireSenderAuthenticationEnabledto$false. In the Exchange admin center, that's Recipients › Groups, the group's Settings tab, Edit delivery management and Allow messages from people inside and outside my organization. To allow one external sender on a restricted list, Microsoft notes that you must first create a mail contact (or mail user) for them:PowerShell# Accept senders from outside the organization Set-DistributionGroup -Identity sales@contoso.com -RequireSenderAuthenticationEnabled $false # Or allow one external sender on a restricted list New-MailContact -Name "Partner Sales" -ExternalEmailAddress orders@fabrikam.com Set-DistributionGroup -Identity sales@contoso.com -AcceptMessagesOnlyFromSendersOrMembers @{Add="orders@fabrikam.com"} # Shared mailbox or Microsoft 365 group that must accept outside mail Set-Mailbox -Identity info@contoso.com -RequireSenderAuthenticationEnabled $false Set-UnifiedGroup -Identity project@contoso.com -RequireSenderAuthenticationEnabled $falseThe
@{Add=...}syntax appends to the list. Assigning a plain value replaces everyone already on it. - Moderated groups: approve the waiting message, add trusted senders to
BypassModerationFromSendersOrMembers, or turn moderation off if it no longer serves a purpose. For groups over 5,000 members, add the sender to the group. - Mail flow rules: find rules that reject, then add an exception or narrow the condition (rule design tips):
PowerShell
Get-TransportRule | Where-Object { $_.RejectMessageReasonText -or $_.RejectMessageEnhancedStatusCode } | Format-Table Name, State, Priority, RejectMessageEnhancedStatusCode, RejectMessageReasonText
Tip: give every reject rule its own reason text and a code from 5.7.900 to 5.7.999. The next NDR then tells you which rule fired without a trace.
Verify the fix#
Ask the original sender to send again, or test from an outside mailbox, then trace it:
Get-MessageTraceV2 -RecipientAddress sales@contoso.com -StartDate (Get-Date).AddHours(-1) -EndDate (Get-Date) |
Format-Table Received, SenderAddress, Subject, Status- Expanded (groups) or Delivered (mailboxes): fixed.
- Failed with the same code: the change hasn't applied yet, or a nested group or second rule also blocks. Check the restricted group named in the new NDR.
- Moderated group: nothing reaches the members until a moderator approves the test message.
Tell it apart from other 5.7.x bounces#
5.7.1 Unable to relayor5.7.57from an app or device: relay and SMTP AUTH (guide).5.4.1 Recipient address rejected: Access denied: the recipient isn't in the directory (guide).5.7.520: external forwarding blocked (guide).5.7.129in hybrid: Microsoft links it to sending to a user whose on-premises account was disabled.
Prevent it next time#
- Decide per group whether it accepts outside mail, and document it in the group's description.
- Keep allowed-sender lists group-based so new staff inherit access.
- When you add a signature service or gateway that re-routes internal mail, test sending to restricted groups first.

