Join our Newsletter — 33% off our NHI Course
Home› Guides› Exchange Online 5.7.57: Client Not Authenticated to Send…
Guide Email & Communications Security

Exchange Online 5.7.57: Client Not Authenticated to Send Mail

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 13 min read
On this page

A 5.7.57 bounce means Exchange Online received a message on its authenticated submission endpoint from a client that never proved who it was, so the server refused it at MAIL FROM. It is one of the most common errors from printers, scanners, line-of-business applications and scripts, and the quick fixes found on forums (turn off MFA, turn off security defaults, re-enable Basic authentication) trade a mail problem for an identity problem. This reference explains what the code means, where it shows up, the causes and their matching fixes, and the secure sending options Microsoft documents: OAuth for SMTP AUTH, a certificate-based connector, High Volume Email and Azure Communication Services Email. It is for messaging administrators and application owners. For the Basic authentication retirement programme itself see the Exchange Online SMTP AUTH Basic Auth Retirement guide; this page is the troubleshooting companion.

This is an independent guide from NHI Mgmt Group, based on Microsoft's public documentation as of November 2026. It is not sponsored or reviewed by Microsoft. Product features change, so confirm settings against Microsoft's current documentation.

Key takeaways

  • It is an authentication gap, not a delivery fault. The client reached smtp.office365.com, the endpoint for authenticated client submission, and tried to send without a successful AUTH.
  • Two shapes, one root. Either the device was never set up to authenticate (it was built for direct send or relay but pointed at the submission endpoint), or it tried to authenticate and failed, then carried on.
  • Do not fix it by weakening identity controls. Disabling MFA or security defaults for a mailbox, or excluding it from a legacy authentication block, reopens the exact path attackers use for password spraying.
  • The timeline makes Basic auth a dead end. Microsoft's updated plan disables Basic authentication for SMTP AUTH by default in existing tenants at the end of December 2026, with a final removal date to be announced in the second half of 2027.
  • Every sender is a non-human identity. Whichever fix you choose, the device or app ends up holding a credential: an app registration, an HVE account, a certificate or an allowed IP. Give each one an owner, a scope and a review date.

What 5.7.57 means

SMTP enhanced status code 5.7.57 is a permanent (5.x.x) security or policy (x.7.x) failure. Microsoft's printer and application troubleshooting article lists it as "5.7.57 Client not authenticated to send mail", and the same article explains that a device using direct send but pointed at smtp.office365.com gets "Client was not authenticated to send anonymous mail during MAIL FROM". In logs and bounces the two usually appear together after an SMTP reply code of 530, for example 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM.

The phrase "during MAIL FROM" matters. The server accepted the TCP connection and the greeting, but when the client issued MAIL FROM there was no authenticated session, and smtp.office365.com does not accept anonymous mail. Nothing about the recipient, the content or the sender's reputation was evaluated.

CodeMicrosoft's textHow it differs from 5.7.57
5.7.57Client not authenticated to send mail; Client was not authenticated to send anonymous mail during MAIL FROMNo authenticated session existed at MAIL FROM
535 5.7.3Authentication unsuccessfulThe client tried AUTH and the credential was rejected; often precedes a 5.7.57 if the client carries on
5.7.60Client does not have permissions to send as this senderAuthenticated, but the From address differs from the signed-in account and Send As is missing
5.7.64TenantAttribution; Relay Access DeniedConnector relay where the IP or certificate is not attributed to your tenant

A separate code is used when Exchange refuses Basic authentication outright; the retirement guide covers that case.

Where it appears

  • Device or application logs: multifunction printers, scan-to-email, monitoring tools, ERP and CRM notification modules, and scripts using SMTP libraries usually write the server reply to their own log. This is often the only place the full text appears, because the message was never accepted and so no NDR reaches a mailbox.
  • Application exceptions: frameworks raise an SMTP exception carrying the reply line, for example during a password reset or invoice run that silently stops sending.
  • Exchange Online reporting: the SMTP AUTH clients report in the Exchange admin center (Reports, Mail flow) shows which sender addresses use SMTP AUTH and with which protocol, which helps find devices that have stopped authenticating successfully. Message trace will not show a message that was refused before acceptance.
  • Hybrid and on-premises: the same text can appear from an on-premises Exchange receive connector that refuses anonymous submission; the causes there are connector permissions, not Exchange Online settings.

Microsoft's automated test at aka.ms/smtprelay (Send email using Microsoft 365) runs the common checks against your tenant and needs an administrator account.

Common causes

Every row below is drawn from Microsoft's troubleshooting and set-up articles. The fix column gives the secure option first.

CauseHow to confirmSecure fix
Device configured with no username or password ("no authentication") but pointed at smtp.office365.comDevice SMTP settings show authentication offIf it only mails internal users, point it at your MX endpoint (direct send) or use HVE; if it mails externally, use a certificate-based connector or OAuth SMTP AUTH
Direct send intended, wrong endpointServer is smtp.office365.com instead of your tenant's mail.protection.outlook.com MX hostUse the MX host on port 25; direct send reaches internal recipients only
SMTP AUTH disabled for the mailbox or organisationGet-CASMailbox -Identity <address> | Format-List SmtpClientAuthenticationDisabled; Get-TransportConfig | Format-List SmtpClientAuthenticationDisabledEnable per mailbox only (Set-CASMailbox ... -SmtpClientAuthenticationDisabled $false) for a sender moving to OAuth; keep the organisation setting disabled
Security defaults on, so SMTP AUTH is unavailableEntra ID, Properties, Manage security defaultsKeep security defaults; move the sender to a certificate connector or HVE with OAuth. Turning security defaults off for one printer weakens the whole tenant
Conditional Access blocks legacy authenticationEntra sign-in logs show the mailbox blocked for a legacy clientMove the sender to OAuth or a connector instead of excluding the mailbox from the policy
Wrong or expired password, or MFA on the account535 5.7.3 in the device log before the 5.7.57Do not remove MFA: replace Basic auth with OAuth client credentials so no user password is involved
Device cannot do TLS 1.2 or uses port 465Device firmware notes; Microsoft states a device defaulting to 465 does not support the required TLSUpdate firmware, or use a connector from a relay server that supports TLS 1.2; legacy TLS opt-in is temporary
Port 587 blocked outboundA connection test to smtp.office365.com on 587 should return a 220 bannerOpen 587 to Microsoft 365 from the device's network segment only

A note on Microsoft's own article: the printer troubleshooting page lists disabling MFA, turning off security defaults and excluding the mailbox from Conditional Access as steps for authentication failures, with a warning about the risk. Treat those as last resort, time-limited exceptions with an owner, never as the fix. See Conditional Access vs Security Defaults.

Secure fix options: OAuth SMTP AUTH, connectors, relay

Microsoft's device and application set-up article compares four methods. The table summarises it (checked 26 November 2026); Azure Communication Services Email is the fifth option Microsoft recommends where Basic auth SMTP AUTH is used to reach both internal and external recipients.

MethodEndpoint and portAuthenticates withExternal recipientsNotes from Microsoft
SMTP AUTH client submission with OAuthsmtp.office365.com, 587 (recommended) or 25OAuth token (client credentials for unattended apps)YesLicensed mailbox; 10,000 recipients a day and 30 messages a minute; TLS 1.2 or 1.3; not compatible with security defaults
SMTP relay connectorYour MX endpoint, 25TLS certificate (recommended) or static public IPYesNo mailbox needed; certificate subject or SAN must contain an accepted domain; cannot be used from third-party hosted services such as Azure; SPF record needed
High Volume Email (HVE)smtp.hve.mx.microsoft, 587HVE account credentials or OAuthNo, internal onlyUp to 100 HVE accounts a tenant, no licence; Basic auth unavailable when security defaults are on
Direct sendYour MX endpoint, 25NoneNo, internal onlyFor advanced customers; treated as anonymous internet mail; Microsoft is working on an option to disable it by default

Choosing between them

  • App that can do OAuth and needs to send as a mailbox: SMTP AUTH with the client credentials flow. Register an app with the SMTP.SendAsApp application permission, grant admin consent, register its service principal in Exchange Online with New-ServicePrincipal (using the Enterprise applications object ID, not the App registrations one; Microsoft warns the wrong ID causes authentication failure), grant mailbox permission, and request tokens with the scope https://outlook.office365.com/.default.
  • Printers and appliances that cannot do OAuth and mail external recipients: a certificate-based connector, either directly or through an on-premises relay server. Prefer certificate over IP because an IP connector depends on a static, unshared address.
  • Internal-only notifications at volume: HVE, with OAuth where the software supports it.
  • Cloud-hosted apps mailing customers: Azure Communication Services Email, since connectors cannot be used from third-party hosted services.
  • Small organisations: one relay host or one HVE account per device group is easier to run than many app registrations; large estates benefit from one identity per application for clean revocation.

Migration steps

  1. Inventory: export the SMTP AUTH clients report for the maximum range and list every sender, its protocol and owner.
  2. Classify each sender against the table above and pick a target method.
  3. Pilot one sender per method; confirm delivery, Sent Items behaviour (only SMTP AUTH saves a copy) and SPF alignment for connector and direct send mail.
  4. Cut over sender by sender, then disable SMTP AUTH on each migrated mailbox with Set-CASMailbox ... -SmtpClientAuthenticationDisabled $true.
  5. Rollback: until the end of December 2026 default change, a failing sender can be put back by re-enabling SMTP AUTH on that one mailbox. Record any such exception with an expiry.
  6. Keep the organisation-wide setting disabled, as Microsoft recommends, with per-mailbox enablement only where still needed.

Application and device credential hygiene

Fixing 5.7.57 always ends with a device or application holding a credential. These are non-human identities and they outlive the people who set them up. See Printer and MFD Service Accounts.

  • App registrations for OAuth SMTP: prefer a certificate credential over a client secret, set an expiry, record an owner, and limit the service principal's mailbox permission to the one mailbox it sends as. See the Azure Entra Client Secrets Security Guide.
  • HVE accounts: one account per application or device group, so a leaked password exposes one sender; store passwords in a secrets manager, not in device web consoles shared by many staff.
  • Connector certificates: track expiry; an expired certificate turns into relay failures (5.7.64) on the renewal date. Protect the private key on the relay host.
  • IP connectors: treat the allowed IP as a credential; anything that can send from that address can relay as your domain.
  • Old mailbox passwords: once a device moves off Basic auth, rotate the mailbox password it used and disable SMTP AUTH on that mailbox, since the old password may still sit in device backups and configuration exports.

Troubleshooting checklist

  1. Capture the full server reply from the device or application log, including any 535 5.7.3 before it.
  2. Confirm the endpoint and port: smtp.office365.com 587 for SMTP AUTH, MX host 25 for connector or direct send, smtp.hve.mx.microsoft 587 for HVE.
  3. Confirm the device is set to authenticate and uses TLS 1.2 or later.
  4. Check SmtpClientAuthenticationDisabled at mailbox and organisation level; remember the mailbox setting overrides the organisation one and $null returns control to it.
  5. Check Entra sign-in logs for the sending account or app: blocked by Conditional Access, security defaults, or wrong credential.
  6. For OAuth, confirm the SMTP.SendAsApp consent, the New-ServicePrincipal registration with the correct object ID, and mailbox permission.
  7. Run aka.ms/smtprelay with an administrator account.
  8. If the sender should not use SMTP AUTH at all, move it to the right method instead of forcing authentication to work.

Detection, measurement and framework mapping

  • Basic auth senders: count of senders using Basic auth in the SMTP AUTH clients report, trending to zero before end of December 2026.
  • Exceptions: mailboxes with SMTP AUTH enabled, each with owner and expiry; mailboxes excluded from legacy authentication blocks (target zero).
  • Credential health: percentage of OAuth SMTP apps using certificates; connector certificates within 30 days of expiry.
  • Abuse signals: failed SMTP AUTH sign-ins from unexpected locations, which indicate password spraying against mail-enabled accounts (ATT&CK T1078.004 Cloud Accounts).
Control areaNIST SP 800-53 Rev 5NIST CSF 2.0
Authenticate devices and apps that submit mailIA-9 Service Identification and AuthenticationPR.AA-03
Manage app secrets, certificates and HVE passwordsIA-5 Authenticator ManagementPR.AA-01
Disable SMTP AUTH where unusedCM-7 Least FunctionalityPR.AA-03
Require TLS 1.2 or later for submissionSC-8 Transmission Confidentiality and IntegrityPR.DS-02

Practitioner checklist

  • Keep SMTP AUTH disabled at organisation level and enable it per mailbox only for senders in migration.
  • Never resolve 5.7.57 by disabling MFA, security defaults or legacy authentication blocks for a mailbox.
  • Move OAuth-capable apps to SMTP.SendAsApp with certificate credentials.
  • Move devices that cannot do OAuth to a certificate-based connector or HVE.
  • Point internal-only devices at the MX endpoint or HVE, never at smtp.office365.com without credentials.
  • Give every sending identity an owner, a single purpose and a review date.
  • Rotate old mailbox passwords once devices move off Basic auth.
  • Recheck Microsoft's SMTP AUTH timeline before the end of December 2026 and when the final removal date is announced.

Standards and references

Related NHI Mgmt Group resources: Exchange Online SMTP AUTH Basic Auth Retirement · Exchange Online Security Guide · Microsoft 365 Direct Send · Legacy Authentication and ROPC Retirement Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.