Deliverability

535 5.7.139 Authentication unsuccessful: Microsoft 365 SMTP fixes

535 5.7.139 means Microsoft 365 refused the SMTP login even though the password may be right. The usual cause is that Authenticated SMTP is disabled for the mailbox or tenant, or Security Defaults blocks basic auth. Enable SMTP AUTH per mailbox, adjust Security Defaults or Conditional Access, use OAuth, or switch to a connector.

Sohail HussainSohail Hussain9 min read

Short answer

  • Exchange Online is refusing the login for a policy reason, not because the password is wrong. The usual cause is Authenticated SMTP being off for that mailbox, so check and enable it first.
  • If it is already on, check Security Defaults, MFA and Conditional Access. If the app only supports basic auth, move it to OAuth or an SMTP relay connector.

An app, copier, payroll tool or Zap logs in to smtp.office365.com with the correct credentials and gets this:

535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator.

The error is on the connection between your app and Microsoft. Your recipient's server, SPF, DKIM and message content are not involved.

Why it happens

The code does not name one cause. It says the sign-in did not meet the tenant's criteria, and several different settings produce it. Here they are, most common first.

  1. Authenticated SMTP is off. SMTP AUTH is disabled for organizations created after January 2020, but you can enable it per mailbox. Microsoft's deprecation page adds that it also disabled SMTP AUTH in all tenants where it wasn't being used. That is why an old integration can stop with no change on your side.
  2. Security Defaults is on. If security defaults is enabled, SMTP AUTH is already disabled in Exchange Online, and you need to disable security defaults to use it.
  3. An authentication policy blocks basic auth. If your authentication policy disables basic authentication for SMTP, clients can't use SMTP AUTH even if you enable the mailbox settings.
  4. MFA or Conditional Access on the account. A plain SMTP login cannot answer an MFA prompt. Microsoft's printer troubleshooting page lists disabling multifactor authentication on the licensed mailbox as one check for "Authentication unsuccessful" errors.
  5. The app only does basic auth, and basic auth is being retired. Microsoft has announced plans to retire Basic authentication for SMTP AUTH in Exchange Online.

The retirement dates have moved several times. Microsoft's own page tells you to refer to the latest official announcement for current milestones. Users on Microsoft's Q&A forum report that the latest plan, announced in January 2026, disables basic auth for SMTP AUTH by default in existing tenants at the end of December 2026, and that admins can turn it back on. I could not confirm that on an official Microsoft page in this check, so verify it in the Exchange team's announcement before you plan around it.

SymptomLikely causeFix
Worked for years, stopped with no changeSMTP AUTH disabled at tenant or mailbox levelEnable Authenticated SMTP (Fix 1)
New tenant, never workedSMTP AUTH off by defaultEnable per mailbox (Fix 1)
Mailbox setting is on, still failsSecurity Defaults or auth policyFix 2
User has MFA, app sends a passwordPassword cannot satisfy MFAFix 3
Printer or old app cannot do OAuthBasic-auth-only clientFix 4

Step-by-step fixes

Fix 1: Enable Authenticated SMTP on the sending mailbox

  1. Open the Microsoft 365 admin center and go to Users > Active users.
  2. Select the sending user, then open the Mail tab.
  3. Under Email apps, select Manage email apps. Checked means enabled, unchecked means disabled.
  4. If it is already checked, uncheck it, save, wait a few minutes, check it again and save. Admins report this clears stuck states; it is a workaround, not a documented step.
  5. Retest after a few minutes.

Some admins report the Authenticated SMTP checkbox is missing from Manage email apps, especially after the 2026 changes. If you do not see it, use PowerShell, which Microsoft documents:

Get-CASMailbox -Identity user@example.com | Format-List SmtpClientAuthenticationDisabled
Set-CASMailbox -Identity user@example.com -SmtpClientAuthenticationDisabled $false

False means enabled, True means disabled, and blank means the mailbox follows the organization setting. Then check the tenant default:

Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled

A per-mailbox value of true or false overrides the organization setting. Microsoft's cmdlet reference describes the pattern I prefer: disable SMTP AUTH at the organization level, enable it for the specific mailboxes, and leave the rest at the default.

Fix 2: Deal with Security Defaults or a basic-auth block

If the mailbox setting is correct and the login still fails, Security Defaults is the next suspect. Microsoft's printer setup page says client SMTP submission using Basic authentication isn't compatible with Security defaults in Microsoft Entra ID.

You have two routes:

  1. Keep Security Defaults on and move the sender to OAuth or a connector (Fixes 3 and 4). This is the safer choice.
  2. Turn Security Defaults off in the Microsoft Entra admin center (search for "security defaults" in the tenant properties). Replace it first with Conditional Access policies that enforce MFA for people, with a narrow exclusion for the one service account.

Do not leave the tenant unprotected

Turning off Security Defaults without Conditional Access policies in place removes the baseline protection for every user. Build the replacement policies first, then switch.

To see which policy actually blocked the attempt, open the user's sign-in logs in the Microsoft Entra admin center and find the failed attempt. The log shows which policy applied, which is the fastest diagnosis when the causes above do not fit.

Fix 3: Use OAuth instead of a password

SMTP AUTH supports modern authentication through OAuth in addition to basic authentication. If your app has a "Sign in with Microsoft" or "Microsoft 365 / Outlook" connection, use that instead of a generic SMTP step. This applies to Zapier-style tools too: pick the Outlook or Microsoft 365 integration, not an SMTP connection to smtp.office365.com.

For your own code, Microsoft's guidance is to update your code to use OAuth 2.0 instead of Basic authentication, or migrate to Graph API. For a third-party app that cannot do OAuth, reach out to its developer or switch tools.

Fix 4: Move a basic-auth-only device to a relay

Printers, scanners and older apps often cannot do OAuth. Microsoft's comparison lists the alternatives: SMTP relay authenticates by static IP address, so your device host needs a static IP visible to Microsoft 365. Direct Send needs no authentication at all.

  • SMTP relay with a connector: in the Exchange admin center, a connector that identifies your server by static public IP or certificate. Good for printers and servers.
  • Direct Send: unauthenticated, to your own tenant's mailboxes. Microsoft's guidance in this area has been changing, so check the current setup page.
  • A transactional SMTP provider: if the app sends application mail rather than a person's mail.

If you stay on client submission, use port 587 (recommended) or 25 with TLS or STARTTLS enabled, and the full mailbox address as the username:

Server: smtp.office365.com
Port: 587
Encryption: STARTTLS (TLS 1.2 or 1.3)
Username: user@example.com

If your device defaults to port 465, it does not support the TLS versions required for client submission. See our note on SMTP encryption for what the ports mean.

Wrong sender gives a different error

If you authenticate as one mailbox but send as another, you will get a send-as bounce such as 5.7.60, not this error. Give the sign-in account Send As permission on the other mailbox.

Checklist before you try again

  • The sending account has a licensed Exchange Online mailbox, not just an Entra account.
  • The username is the full address, and you can sign in to Outlook on the web with the same password.
  • SmtpClientAuthenticationDisabled is False on the mailbox, or blank with the tenant value also False.
  • Security Defaults and any authentication policy are not blocking basic auth for this account.
  • The sign-in log in Entra shows no Conditional Access policy blocking the attempt.
  • The app uses smtp.office365.com, port 587 and STARTTLS, not an IP address or port 465.
  • You waited a few minutes after changing settings before retesting.

If nothing works

If SMTP AUTH is enabled and no policy shows as blocking in the sign-in logs, open a support case with Microsoft from the admin center. Include the exact error text, the UTC timestamp of a failed attempt, the sender mailbox, the client IP, the sign-in log entry and the steps you already tried.

Subject: SMTP AUTH client submission fails with 535 5.7.139

Our app fails to send through smtp.office365.com:587 (STARTTLS) with:
"535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator."

Mailbox: user@example.com
Failed attempt (UTC): 2026-11-30 14:05
Client IP: 203.0.113.10
Already checked: SmtpClientAuthenticationDisabled is False on the mailbox; tenant setting checked; Security Defaults status checked; no blocking policy in the Entra sign-in log.
Please confirm whether basic auth for SMTP AUTH is blocked for this tenant and what we need to change.

How Mailneo fits

This error comes from your Microsoft 365 tenant, and Mailneo cannot change SMTP AUTH, Security Defaults or Conditional Access for your other apps. If your goal is outreach or newsletters, Mailneo connects Outlook and Microsoft 365 mailboxes by OAuth, so no SMTP password is involved, and you can test the connection after adding it. The steps are in the email accounts documentation. A custom SMTP account pointed at Microsoft would run into the same policies described above.

Common questions

Why do I get this error when my password is correct?

The server is rejecting the sign-in method or the account's policy state, not the password. SMTP AUTH being off, Security Defaults or an authentication policy can all block a correct password.

Does the error mean my emails are going to spam or bouncing at the recipient?

No. The login fails before any message is accepted, so nothing has been sent. Recipient-side bounces carry different codes.

Should I just re-enable basic auth for the whole tenant?

I would not. Microsoft's guidance is to disable SMTP AUTH in your organization and enable it only for the accounts that still require it. That is a better fit for devices that truly cannot do OAuth.

Does this affect Outlook.com personal accounts?

Microsoft's Q&A forum has reports of consumer Outlook.com mailboxes created in 2026 where SMTP AUTH is disabled with no toggle available. That is a service-side limit; for those, use an app that supports OAuth.

deliverabilitymicrosoft-365zapiersisenseerror-codes
Share this article
Sohail Hussain

Sohail Hussain

Founder & CEO at Mailneo

Building Mailneo — AI-powered email marketing for growing businesses.

Related Articles

Deliverability

421 4.7.28 Gmail Unusual Rate of Unsolicited Mail: Fixes

The 421 4.7.28 error is a temporary Gmail deferral, not a block. Gmail is rate limiting a domain, DKIM domain or IP range it sees sending too much unwanted mail. Retries usually deliver, but you should fix authentication, unsubscribe headers, sending pace and shared infrastructure to stop it recurring.

Sohail Hussain|9 min read
Deliverability

451 4.7.500 Server busy: SMTP2GO stuck at Processed (Microsoft)

`451 4.7.500 Server busy. Please try again later.` is a temporary Microsoft deferral of the connecting IP, not a problem with your message. SMTP2GO keeps retrying, so mail sits at "Processed" for hours. Ask SMTP2GO to rotate your IP, move to a dedicated IP, or allow-list carefully in Defender.

Sohail Hussain|9 min read
Deliverability

550 5.7.1 Message lacks SPF/DKIM/DMARC: Find the Real Cause

Outlook.com and Hotmail return "550 5.7.1 Message rejected: Message lacks SPF/DKIM/DMARC Auth Records" when a message fails their authentication checks. Valid SPF alone is not enough. Publish SPF, DKIM and an enforced DMARC policy for your From domain, then confirm the real cause in Message Trace.

Sohail Hussain|10 min read
Deliverability

550 5.7.1 Sender address rejected: marked as invalid (M365)

"550 5.7.1 Sender address rejected: User email address is marked as invalid." means a receiving server refused your From address. Check SPF, DKIM and DMARC, then clear a stale Outlook autocomplete entry. If only one recipient bounces, their admin must check mail flow rules, block lists and filters.

Sohail Hussain|9 min read

Ready to supercharge your email marketing?

Start sending smarter emails with AI-powered campaigns. No credit card required.

Get Started Free