Skip to content

Est. 2011ยทMicrosoft Partner ID 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

License Error 535 5.7.139

535 5.7.139 authentication unsuccessful: SMTP AUTH submission failures

11 min read Updated October 5, 2026 Exchange Server

Fix it now

The credentials were presented and the service would not accept them for SMTP submission. In nearly every case the password is fine and the method has been refused: authenticated SMTP is switched off for the tenant or the mailbox, or an authentication policy blocks basic authentication for SMTP.

Run these in Exchange Online PowerShell, in order

Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled
Get-CASMailbox user@contoso.com | Format-List SmtpClientAuthenticationDisabled
Set-CASMailbox user@contoso.com -SmtpClientAuthenticationDisabled $false
  1. Check the same switch in the admin centre if you prefer: Users, then Active users, then the user, then Mail, then Manage email apps, and look at Authenticated SMTP.
  2. Confirm the device is using the settings Microsoft documents: smtp.office365.com as the server, TCP 587, StartTLS enabled with TLS 1.2 or 1.3, and the full primary address as the username.
  3. Check whether security defaults are on. Microsoft states that with security defaults enabled, SMTP AUTH is already disabled in the tenant and must be turned off for SMTP AUTH to work.
  4. Check for an authentication policy with AllowBasicAuthSmtp off. A policy change takes up to 24 hours unless you run Set-User -Identity <user> -STSRefreshTokensValidFrom $([System.DateTime]::UtcNow), which brings it down to about 30 minutes.

Microsoft does not publish a meaning for 5.7.139. Do not read anything into the number itself; work from the four settings above, all of which are documented.

If the device sends after that, stop here. If not, the next section covers the other codes in this family and the submission paths that do not need a password at all.

Why it happens

Authenticated client SMTP submission is the path most devices were built for: connect to the submission endpoint, present a username and password, send. It is also the path being closed down, because a password sitting in a copier’s configuration cannot be protected with multi-factor authentication. Basic authentication is now disabled in all Exchange Online tenants, and Microsoft has published a timeline for retiring basic authentication for SMTP AUTH too, so a refusal here is an access decision rather than a credential error.

Four settings can each refuse the session independently, and they are checked in different places. The organisation-wide switch is SmtpClientAuthenticationDisabled on the transport configuration. The per-mailbox switch of the same name on the CAS mailbox overrides it. Security defaults disable SMTP AUTH for the tenant outright. And an authentication policy with AllowBasicAuthSmtp turned off blocks it regardless of the other three: Microsoft states plainly that if your authentication policy disables basic authentication for SMTP, clients cannot use SMTP AUTH even with the mailbox setting enabled.

The neighbouring codes are worth separating, because only one of them is about a disabled method. 530 5.7.57 is Microsoft’s published code for a client that did not authenticate at all before MAIL FROM. 5.7.3 is published in Microsoft’s Exchange Server DSN reference as cannot achieve Exchange Server authentication, or not authorized. 4.7.0 is not published by Microsoft; RFC 3463 defines X.7.0 as a security-related failure that no more specific code describes, and the leading 4 makes it temporary.

Authenticated SMTP is disabled for the tenant or the mailbox

You have this one if The account signs in normally to mail and to the portal, and only SMTP submission is refused.

  1. Read both values. The per-mailbox setting overrides the organisation one and either can be responsible.
  2. Enable it for the specific mailbox that needs it rather than for the whole organisation: Set-CASMailbox user@contoso.com -SmtpClientAuthenticationDisabled $false.
  3. Treat it as a temporary accommodation with a date attached, not a permanent design.
  4. Retest from the device itself, on its own network, not from a test tool elsewhere.

If you have already enabled submission organisation-wide, narrow it back down as each application is migrated. A tenant-wide setting to accommodate one scanner is a much larger exposure than the scanner.

Security defaults or an authentication policy blocks the method

You have this one if SmtpClientAuthenticationDisabled is $false on the mailbox and the submission is still refused.

  1. Check whether security defaults are enabled. Microsoft documents that this disables SMTP AUTH in the tenant, and that it must be turned off for SMTP AUTH to be used.
  2. Check for an authentication policy assigned to that user with AllowBasicAuthSmtp off, using Get-AuthenticationPolicy.
  3. Do not disable the policy for everybody to accommodate one device. Where an exclusion is unavoidable, scope it to the single account and record why it exists.
  4. After a policy change, expect up to 24 hours, or force it to about 30 minutes with Set-User -Identity <user> -STSRefreshTokensValidFrom $([System.DateTime]::UtcNow).

The submitting identity is not a licensed mailbox

You have this one if Submission fails for an unlicensed account, or for a shared mailbox being used as an application identity.

  1. Microsoft documents client SMTP submission as requiring a licensed Microsoft 365 or Office 365 mailbox. Confirm the account has one.
  2. Do not use a shared mailbox as the submitting identity. Microsoft states a shared mailbox is not intended for direct sign-in and that sign-in should always be blocked for its account.
  3. If the mail only needs to appear to come from a shared address, authenticate as a licensed user and grant that user Send As on the shared mailbox.
  4. Retest once the licence is assigned and the mailbox has finished provisioning.

The device is on the wrong endpoint, port or transport

You have this one if One device works and another does not, from the same tenant and often the same account.

  1. Set the server to smtp.office365.com by name. Microsoft says explicitly not to use an IP address.
  2. Use TCP 587 with StartTLS. TLS 1.2 or 1.3 is required for client submission, and a device that cannot negotiate it will never authenticate.
  3. Use the full primary SMTP address as the username, not an alias and not a down-level name.
  4. If the device offers no TLS at all, it cannot use this path; move it to one of the paths below.

Full reference

The four documented ways to send, and what each costs

Path Endpoint and port Authentication Reaches the internet
Client SMTP submission smtp.office365.com, TCP 587 or 25, TLS required Licensed mailbox username and password Yes
SMTP relay Your MX endpoint, TCP 25 One or more static IP addresses, via a connector Yes
Direct send Your MX endpoint, TCP 25 None No, own recipients only
High Volume Email TCP 587, TLS required HVE account credentials or an OAuth token No, own recipients only

Microsoft publishes throttling limits alongside those: client SMTP submission is capped at 10,000 recipients per day and 30 messages per minute, and it is the only one of the four that saves a copy to Sent Items. Direct send is the fallback for equipment that supports nothing else, and Microsoft’s own guidance is to choose it only when a legacy device cannot do any of the others.

Reading the failure

What the client reports What it points at
535 5.7.139 straight after the credentials No published meaning. Check the tenant switch, the mailbox switch, security defaults and any authentication policy
530 5.7.57 The client did not authenticate at all before MAIL FROM. Microsoft publishes this one
535 5.7.3 Cannot achieve Exchange Server authentication, or not authorized
454 4.7.0 A temporary security or policy failure. Retry before investigating
Works from one device, fails from another Endpoint, port, TLS version or username format on the failing device
Worked until a security change An authentication policy or security defaults, not the mailbox setting

Settings that are documented, and a code that is not

It is worth being blunt about this: 5.7.139 does not appear in Microsoft’s Exchange Online NDR reference, in the article on enabling and disabling authenticated client SMTP submission, in the basic authentication deprecation article, or in the multifunction device guidance, and there is no dedicated troubleshooting page for it. The settings that refuse the session are all documented; the number Exchange Online returns is not. Diagnose from the settings.

Moving off a stored password

  1. Work out who the mail actually has to reach. If every recipient is inside your own organisation, direct send needs no credential and no licence.
  2. If it must reach external recipients and the device has a static public address, an SMTP relay connector authenticated by IP address or certificate removes the password without changing the recipients.
  3. If the device can do modern authentication, use OAuth. That is Microsoft’s documented replacement for basic authentication.
  4. Keep client SMTP submission for the cases where a real mailbox genuinely has to authenticate, and record which accounts those are.

When nothing changes after you enable it

  • Give the change time. An authentication policy takes up to 24 hours unless you refresh the user’s tokens explicitly.
  • Check you edited the mailbox the device is authenticating as, not the mailbox in the From address. They are frequently different.
  • Confirm the device is not caching an old failure. Many appliances stop retrying after a run of authentication failures and need a restart.
  • Read the message trace for the sender address rather than the account, so you can see whether anything reached the service at all.

When a licence is the actual fix

Authenticated submission needs a licensed mailbox to authenticate as: Microsoft’s own requirement for client SMTP submission is a licensed Microsoft 365 or Office 365 mailbox, and it documents that a shared mailbox is not intended for direct sign-in and should have sign-in blocked. That is why automated senders fail while ordinary users are unaffected – the automation is running as an account nobody licensed. Where the sending identity genuinely has to be a mailbox, a Microsoft 365 Business Standard licence on that account is a legitimate fix and Arco can supply it. It is not the only route and it would be wrong to pretend otherwise: direct send to your own recipients, and an IP or certificate authenticated relay connector, both work with no additional licence, and for a scanner that only ever mails internal staff they are the better engineering answer. Buy the licence when the account needs to be a mailbox, not to keep alive an authentication method that is being retired.

Every code this article covers

Code What it points at Source
535 5.7.139 No meaning is published by Microsoft for this code. Treat it as an SMTP AUTH submission refused at the authentication step and work from the four documented settings: the transport config switch, the CAS mailbox switch, security defaults, and any authentication policy not published by the vendor
535 5.7.3 Cannot achieve Exchange Server authentication, or not authorized Microsoft Learn
530 5.7.57 Client was not authenticated to send anonymous mail during MAIL FROM: the device is configured against the submission endpoint but is not authenticating Microsoft Learn
454 4.7.0 A temporary security or policy failure. RFC 3463 defines X.7.0 as a security-related problem no more specific code describes; Microsoft does not publish 4.7.0 RFC 3463

Confirm the fix worked

  1. The device or application sends a test message and it appears in the message trace with the expected sender address.
  2. Get-CASMailbox and Get-TransportConfig show the submission settings you intended, and no broader than intended.
  3. A message to an external recipient succeeds if that was a requirement, since internal-only paths pass an internal test and fail in production.
  4. If you moved the device to direct send or a relay connector, the stored password has been removed from the device and it still sends.

Questions people ask about this

Do I have to buy a licence to make my scanner send mail?

Not usually. If the scanner only sends to people inside your own organisation, direct send needs no credential and no extra licence. A licence is genuinely required only when the sending identity has to be a real mailbox that authenticates.

What does 5.7.139 actually mean?

Microsoft does not publish a meaning for it. What is documented is the set of settings that refuse an SMTP AUTH session: SmtpClientAuthenticationDisabled at the organisation and mailbox level, security defaults, and an authentication policy with AllowBasicAuthSmtp turned off. Check those four.

Can I turn basic authentication back on and forget about it?

You can enable authenticated SMTP for a mailbox, but treat it as borrowed time. Microsoft has already disabled basic authentication across all tenants for other protocols and has published a retirement timeline for SMTP AUTH, and a password stored in a device is exactly the credential that gets stolen.

Why does the same password work in Outlook but not in the application?

Outlook uses modern authentication and the application is using the legacy path. The credential is fine; the method it is presented with is what has been refused.

What is the difference between direct send and a relay connector?

Direct send delivers only to recipients in your own organisation and needs no configuration on the service side. A connector authenticated by your static public address or a certificate can also reach external recipients, but it has to be set up and maintained deliberately.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

Free Fix 552 5.3.4: the message is larger than the Exchange size limit allows Free Fix 550 5.1.1 and 550 5.1.10: Exchange cannot find the recipient mailbox Free Fix HTTP 500.19 on Exchange virtual directories: broken IIS configuration files License Error MigrationPermanentException: the move failed in a way retrying cannot fix
โ† Back to Knowledge Base