Consumer Outlook.com OAuth2 IMAP Works but SMTP Fails with "SmtpClientAuthentication is disabled" on New Account

Tuco 0 Reputation points
2026-05-28T18:54:45.8133333+00:00

Summary: I have a new consumer Outlook.com account where OAuth2 IMAP works perfectly, but OAuth2 SMTP is blocked with error 535 5.7.139. The account settings page indicates SMTP should be available, but perhaps the backend flag is disabled ?

Environment:

Account Type: Consumer Outlook.com (Free/Personal)

Client: Alpine 2.26 (Linux CLI, OAuth2 compliant)

Server: outlook.office365.com:587 (STARTTLS)

Auth Method: OAuth2 with valid Access Token.

Scope: In initial OAuth2 device flow, authorizing "Access to sending emails from your mailbox. Alpine will be able to send email on your behalf from your mailbox." which supports that token includes https://outlook.office.com/SMTP.Send.

The Issue:

IMAP Works: I successfully authenticated via OAuth2 and can read mail from outlook.office365.com:993. This confirms the account is active, OAuth2 consent is granted, and the client ID is valid.

SMTP Fails: When submitting mail via SMTP with the same valid token, the server rejects it immediately after AUTH XOAUTH2 with "535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Mailbox. Visit https://aka.ms/smtp_auth_disabled for more information. ...".  

Full SMTP Log is available on request.

Outlook | Web | Outlook.com | Email
0 comments No comments

2 answers

Sort by: Most helpful
  1. Alessandro Goldbeck 0 Reputation points
    2026-08-25T14:09:51.8233333+00:00

    Does this suggested solution apply to free personal accounts?

    Was this answer helpful?


  2. AI answer

    2026-05-28T18:55:01.7533333+00:00

    SMTP AUTH is disabled for the mailbox, which prevents OAuth2 SMTP submission even though IMAP works.

    For consumer Outlook.com accounts, SMTP client authentication can be disabled either at the tenant level or at the mailbox level. When disabled, any SMTP AUTH attempt (including OAuth2 via AUTH XOAUTH2) fails with the error:

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

    To resolve this, SMTP must be enabled by an administrator using Exchange Online PowerShell:

    1. Check whether SMTP is disabled at the tenant level:
         Get-TransportConfig | Select SmtpClientAuthenticationDisabled
      
      • True means SMTP AUTH is disabled tenant-wide.
      • False means it is allowed at the tenant level.
    2. If disabled tenant-wide, enable SMTP AUTH:
         Set-TransportConfig -SmtpClientAuthenticationDisabled $False
      
    3. Check the mailbox-level setting:
         Get-EXOCasMailbox <mailbox account> -Properties SmtpClientAuthenticationDisabled | Select SmtpClientAuthenticationDisabled
      
      • Blank: mailbox inherits the tenant setting.
      • True: SMTP AUTH is disabled for this mailbox.
      • False: SMTP AUTH is explicitly enabled for this mailbox.
    4. If SMTP is disabled for the mailbox, enable it:
         Set-CasMailbox <mailbox account> -SmtpClientAuthenticationDisabled $False
      

    Once SMTP AUTH is enabled at both the tenant and mailbox levels, OAuth2 SMTP submission from the client should succeed, assuming the token and scopes are otherwise valid.

    If direct SMTP cannot be enabled or remains blocked, an alternative is to use a client or configuration that connects via Outlook.com/Exchange sync (MAPI/HTTP) or another supported protocol that uses OAuth, rather than SMTP.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.