SMTP AUTH (OAuth2/XOAUTH2) fails with 535 5.7.139 on personal Outlook.com account while IMAP OAuth2 works fine — is there any supported way to enable it, or is Graph sendMail the only path?

Luis Ernesto Daza Firma 20 Puntos de reputación
2026-09-22T20:31:06.16+00:00

I'm integrating Outlook/Microsoft 365 account support into a backend service (Node.js) that already supports Gmail the same way: OAuth2 tokens are obtained client-side (MSAL), and the backend uses them to talk to the mailbox directly over IMAP/SMTP with XOAUTH2 — no Microsoft Graph involved. IMAP works perfectly. SMTP does not, and I want to confirm whether there's any supported fix before I move the send path to Graph.

Setup

  • App registration in Microsoft Entra ID, "Accounts in any organizational directory and personal Microsoft accounts" (multi-tenant + personal).
  • Token endpoint: https://login.microsoftonline.com/common/oauth2/v2.0/token.
  • Scopes requested and granted on consent: openid profile offline_access https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/SMTP.Send.
  • Test account: a personal Outlook.com (MSA) mailbox, not a Microsoft 365 org account.
  • IMAP: connects to outlook.office365.com:993 with XOAUTH2 using the access token — works without issue (list/read/sync all fine).
  • SMTP: connects to smtp.office365.com:587 with XOAUTH2 using the same access token — fails immediately with:

535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Mailbox.

What I've already checked

  • The aka.ms/smtp_auth_disabled doc, which documents Set-CASMailbox -SmtpClientAuthenticationDisabled $false, but that cmdlet is only available to admins of an Exchange Online tenant — there's no equivalent surface (Exchange admin center, account.live.com, or any other settings page) exposed to a personal Outlook.com account owner.
  • Several existing Q&A threads reporting the identical symptom (IMAP OAuth2 works, SMTP OAuth2 fails with the same 535 5.7.139) specifically on personal/consumer accounts, with no confirmed resolution.
  • The Thunderbird for Android project has an open, unresolved issue (thunderbird/thunderbird-android#7597) with the exact same error against Office365/Outlook.com — suggesting this isn't specific to my client implementation.

Question

For a personal Outlook.com/Hotmail mailbox specifically (not an Exchange Online org tenant):

  1. Is there any supported way — a setting, a different scope, a different token audience, a beta/preview flag — for the mailbox owner themselves to enable SMTP AUTH over OAuth2, even temporarily?
  2. If the answer is no, is Microsoft Graph's POST /me/sendMail (or /users/{id}/sendMail) the only supported way going forward to send mail on behalf of a personal Outlook.com account from a third-party backend? I want to confirm this is the intended migration path and not something that will also be restricted later for third-party apps.
  3. Is this specific to newly created Outlook.com accounts, or does it apply uniformly regardless of account age? (One of the threads I found suggested newer accounts are more consistently affected.)

Any pointer to the authoritative current policy (not just the generic Basic Auth deprecation FAQ, which is org-tenant focused) would be very helpful.

Outlook | Web | Outlook.com | Correo electrónico
0 comentarios No hay comentarios

Respuesta aceptada por el autor de la pregunta
Kai-H 28,425 Puntos de reputación Personal externo de Microsoft Moderador
2026-09-23T09:55:12.6166667+00:00

(Please note that this is Spanish Q&A Forum, any threads should be posted in Spanish. However, I will still provide an answer in English based on your initial response.)

Hi, Luis Ernesto Daza Firma

Your OAuth setup appears correct. The delegated SMTP scope is https://outlook.office.com/SMTP.Send, and OAuth2/XOAUTH2 is documented as supported for both Microsoft 365 and Outlook.com users. However, a valid token does not override the mailbox’s SmtpClientAuthenticationDisabled setting. If SMTP AUTH is disabled on the mailbox, the service rejects OAuth2 SMTP with 535 5.7.139 before the message is submitted. Authenticate an IMAP, POP, or SMTP connection using OAuth

There is no documented self-service setting, alternative scope, token audience, or preview flag that lets the owner of a personal Outlook.com mailbox change that backend SMTP AUTH flag. The documented Set-CASMailbox -SmtpClientAuthenticationDisabled $false method applies to Exchange Online organizations and requires administrative access. A consumer Outlook.com user does not have access to Exchange Online PowerShell or the Microsoft 365 admin controls needed to change it. Enable or disable authenticated client SMTP submission

Before abandoning SMTP, I would make one final change: use smtp-mail.outlook.com on port 587 with STARTTLS. That is the SMTP endpoint currently listed for personal Outlook.com accounts, while smtp.office365.com is normally used for Exchange Online organizational mailboxes. Keep the same OAuth scope and XOAUTH2 format. If the supported Outlook.com endpoint returns the same SmtpClientAuthentication is disabled for the Mailbox response, changing the scope, consent, Nodemailer settings, or token will not resolve it. POP, IMAP, and SMTP settings for Outlook.com

For a backend service, Microsoft Graph is therefore the practical supported migration path when SMTP AUTH is disabled. Register the application for personal Microsoft accounts, request the delegated Microsoft Graph Mail.Send permission, obtain the user’s token through an authorization-code flow using common or consumers, and submit through POST /me/sendMail. The Graph documentation specifically lists delegated Mail.Send support for personal Microsoft accounts. The endpoint accepts JSON or MIME messages and normally saves sent messages in Sent Items. Microsoft Graph sendMail

For personal accounts, /me/sendMail is the clearest choice because the token represents the signed-in mailbox owner. Do not redesign this as an app-only, client-credentials service expecting unrestricted access to personal Outlook.com mailboxes. Keep the delegated authorization and refresh-token model you already use, but request the Graph Mail.Send scope and obtain a Graph access token rather than reusing the Outlook-resource token. Access tokens are resource-specific.

I would not describe the behavior as applying uniformly to every Outlook.com account or as a formally announced account-age policy. Current reports show the problem more consistently with recently created consumer mailboxes, while some older accounts continue to accept OAuth2 SMTP. However, the current public documentation still states that Outlook.com supports OAuth2 SMTP and does not publish an account creation date, rollout rule, or consumer control for SmtpClientAuthenticationDisabled. Similar reports from February through August 2026 describe the same new-account pattern, but they do not establish an authoritative universal policy.

So the concise answer is: there is no supported owner-accessible switch to enable mailbox-level SMTP AUTH on an affected personal account. Test once with the documented smtp-mail.outlook.com endpoint. If the same 5.7.139 response remains, move the sending path to delegated Microsoft Graph Mail.Send and /me/sendMail. Graph is a documented API for personal Microsoft accounts, although no public cloud API can be guaranteed never to change. Microsoft normally handles such changes through published deprecation and migration notices rather than promising permanent behavior.

Thank you for your patience in reading, I hope this information has been helpful to you. 


If the answer is helpful, please click "Yes" and kindly upvote it. If you have extra questions about this answer, please click "Comment."    

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

¿Le resultó útil esta respuesta?

2 personas encontraron esta respuesta útil.

0 respuestas adicionales

Ordenar por: Lo más útil

Su respuesta

Las respuestas pueden ser marcadas como Respuestas aceptadas por el autor de la pregunta, lo que indica a los usuarios que la respuesta resolvió su problema.