Error Details
| Fact | Value | Source | Note |
|---|---|---|---|
| Exact error string | 550 5.7.1 Relay Access Denied | Exchange admin center > Mail flow > Message trace | -> NDR |
| Affected build range | Exchange Online / Microsoft 365 | Microsoft documentation | |
| Registry key or OMA-URI involved | N/A for cloud-based Exchange Online | -> No local registry changes | |
| Relevant service/endpoint URL | https://outlook.office365.com/EWS/Exchange.asmx | Microsoft documentation | |
| Log line signature | Event ID 1050 in Application log on hybrid server | -> Connector relay errors |
Log Files to Check
Application log on Exchange hybrid server (Event ID 1050)Exchange admin center > Mail flow > Message trace
What This Error Actually Means
The error code "550 5.7.1 Relay Access Denied" is raised by Exchange Online when a sending server or connector attempts to relay mail through the service but lacks proper authorization to do so. The specific component responsible for this action is the Message Transfer Agent (MTA) within Exchange Online, which enforces strict access control policies to ensure that only authorized entities can send email on behalf of users in your organization. This error typically manifests when an external partner or internal system attempts to relay mail through your Exchange Online environment without having been explicitly granted permission. The error is designed to prevent unauthorized relaying and protect against potential security threats such as spamming activities.Affected Versions and Scope
The "550 5.7.1 Relay Access Denied" error affects all versions of Exchange Online and Microsoft 365, including the latest builds. It is particularly relevant in hybrid environments where on-premises Exchange servers are connected to Exchange Online for email flow management. This issue does not affect standalone Exchange Server deployments that do not connect to or relay through Exchange Online. Additionally, it does not impact scenarios where all mail flows are strictly internal and no relaying occurs outside the organization's domain boundaries.Where To Look First: Logs and Event IDs
To diagnose this error, you should first investigate logs in both the cloud-based Exchange Online environment and on-premises hybrid servers. In Exchange Online, navigate to the Message Delivery Report within the Exchange admin center (EAC) at "Mail flow > Message trace". Here, search for the sender address associated with the failed delivery attempt and look for the 550 5.7.1 NDR entry. On-premises hybrid servers will log relevant events in the Application log under Event ID 1050. This event provides critical information about relay access failures that occur when attempting to send mail through Exchange Online from an on-premises server.
Be cautious when modifying receive connectors, as changes can disrupt email flow for enrolled devices and may require careful testing before deployment.
Root Causes
Lack of Authorization in Accepted or Remote Domains
This issue arises when a partner domain or on-premises server is configured to relay mail through Exchange Online but has not been added as an accepted or remote domain. To verify this, use the following PowerShell cmdlet:Get-AcceptedDomain | Select-Object DomainName,DomainType
SMTP AUTH Disabled for Sending Account
Another common cause is when a sending account uses SMTP AUTH to relay mail but does not have this feature enabled. Check if SMTP client authentication is disabled by running:Get-CASMailbox -Identity | Select-Object SmtpClientAuthenticationDisabled
Hybrid Connector Configuration Issues
In hybrid environments, the issue might stem from missing TLS certificates or incorrect permissions on receive connectors. Ensure that your hybrid connector has a valid TLS certificate and that the IP address of the sending device is granted relay permission.
A quick diagnostic shortcut is to check if the sending IP address appears in the EOP connection filter's block list: "Exchange admin center > Mail flow > Connection filter".
Fix Procedure
- Run a message trace in Exchange Online to identify the sender and recipient addresses involved. Use:
Get-MessageTrace -StartDate (Get-Date).AddHours(-2) -EndDate (Get-Date) - To enable SMTP AUTH for individual mailboxes, run:
Set-CASMailbox -Identity-SmtpClientAuthenticationDisabled $false - If organization-wide SMTP AUTH is disabled, you can override this setting per mailbox or switch to modern authentication methods like OAuth.
- In hybrid scenarios, ensure the receive connector on-premises grants relay permission. Use:
Get-ReceiveConnector | Where-Object RemoteIPRanges -contains '' - To remove a sending IP from the block list in EOP connection filter policy, run:
Set-HostedConnectionFilterPolicy -Identity Default -IPBlockList @{Remove=''}
Error Code Variants
| Error Code | Description | Distinguishing Features |
|---|---|---|
| 550 5.1.3 | Recipient address rejected due to policy restrictions. | This error occurs when the recipient's domain has specific policies that prevent mail delivery from certain senders or domains. |
| 550 5.7.12 | User is not authorized to relay through this server. | This error indicates a more general lack of authorization, often related to user permissions rather than domain or IP restrictions. |