SaferComputing.com

Reference · Accounts and sessions

SMTP AUTH in Exchange Online: check whether it is on and turn it off

Check whether SMTP AUTH (authenticated SMTP on port 587) is on in Exchange Online with Get-TransportConfig and Get-CASMailbox, turn it off, and prepare for Basic authentication ending by default in December 2026.

Published
Last checked
Applies to
Microsoft 365 and Office 365 organizations with Exchange Online
Technical specification
Target artifactAuthenticated client submission (SMTP AUTH) to Exchange Online, usually on TCP port 587 at smtp.office365.com: the organization setting SmtpClientAuthenticationDisabled in Get-TransportConfig, and the setting of the same name on each mailbox in Get-CASMailbox.
Default behaviourOff in organizations created after January 2020, and off wherever security defaults are on; Microsoft also turned it off in organizations that were not using it. Older organizations that used it can still have it on. A mailbox's own setting is blank by default and follows the organization; True or False on a mailbox overrides it.
Safe stateOff for the organization (SmtpClientAuthenticationDisabled is True); on only for the mailboxes of devices and apps that still need it, signing in with OAuth rather than a password; no unexpected senders in the SMTP AUTH Clients report.
Check in Microsoft 365Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled
Check across the organizationGet-CASMailbox -ResultSize unlimited | where {$_.SmtpClientAuthenticationDisabled -eq $false}
Fix in Microsoft 365Set-TransportConfig -SmtpClientAuthenticationDisabled $true
Fix for one mailboxSet-CASMailbox -Identity user@example.com -SmtpClientAuthenticationDisabled $true

Read the result

WhereValueWhat it means
Organization, in Get-TransportConfigTrueSMTP AUTH is off for every mailbox without a setting of its own
OrganizationFalseSMTP AUTH is on for every mailbox without a setting of its own
Mailbox, in Get-CASMailboxblankThe mailbox follows the organization setting
MailboxFalseOn for this mailbox, whatever the organization setting says
MailboxTrueOff for this mailbox

The mailbox setting takes precedence over the organization setting, so an organization set to True can still have mailboxes that send with SMTP AUTH; the check across the organization lists them. To read one mailbox:

Windows PowerShell, connected to Exchange Online
Get-CASMailbox -Identity user@example.com | Format-List SmtpClientAuthenticationDisabled

In the Microsoft 365 admin center, the same per-mailbox switch is Authenticated SMTP: Users, Active users, select the user, Mail, then Manage email apps. Checked means on.

If security defaults are on in Microsoft Entra ID, SMTP AUTH is already off in Exchange Online; to use it, Microsoft says security defaults would have to be turned off.

Why it matters

Microsoft describes SMTP AUTH as a legacy protocol that supports Basic authentication by default and can be used to send email from compromised accounts. Legacy authentication, which includes any client using SMTP, IMAP or POP3, does not support multifactor authentication: with a stolen password, an attacker can sign in through an older protocol even when multifactor authentication is required. Microsoft says most compromising sign-in attempts come from legacy authentication.

Virtually all modern email clients, including Outlook, Outlook on the web, iOS Mail and Outlook for iOS and Android, do not use SMTP AUTH. Microsoft therefore recommends turning it off for the organization and on only for the mailboxes that still need it, such as POP and IMAP clients, devices that scan to email, and applications that send notifications.

Basic authentication for SMTP AUTH is ending

Microsoft has announced the retirement of Basic authentication for SMTP AUTH and has updated the timeline since. Its Exchange documentation points to the Exchange team's January 2026 announcement for the current dates, which message center post MC786329 repeats (updated 27 January 2026):

WhenWhat happens
Until the end of December 2026No change
End of December 2026Basic authentication for SMTP AUTH is turned off by default in existing organizations; administrators can turn it back on where needed
Organizations created after December 2026Basic authentication for SMTP AUTH is not available by default; OAuth is the supported method
Second half of 2027Microsoft announces the final removal date

Devices and apps can keep using SMTP AUTH if they sign in with OAuth. Find the ones still sending with a password before the end of December; see Find who still uses it.

Turn it off

For the whole organization
Windows PowerShell, with the ExchangeOnlineManagement module installed
Connect-ExchangeOnline
Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled
Set-TransportConfig -SmtpClientAuthenticationDisabled $true

In the Exchange admin center, the same switch is Turn off SMTP AUTH protocol for your organization, on the Mail flow page under Settings. Then list the mailboxes whose own setting still turns it on:

Windows PowerShell, connected to Exchange Online
$Users = Get-CASMailbox -ResultSize unlimited
$Users | where {$_.SmtpClientAuthenticationDisabled -eq $false}
For one mailbox, such as one that was taken over
Windows PowerShell, connected to Exchange Online
Set-CASMailbox -Identity user@example.com -SmtpClientAuthenticationDisabled $true
Get-CASMailbox -Identity user@example.com | Format-List SmtpClientAuthenticationDisabled

$true turns it off for that mailbox even where the organization allows it; $null hands the mailbox back to the organization setting. In the Microsoft 365 admin center, clear Authenticated SMTP under Manage email apps and select Save changes. For a mailbox that was taken over, do this alongside the password reset and session revocation in Account compromise triage.

Allow it only where it is still needed

Microsoft's pattern: off for the organization, on for the specific mailboxes that need it, and every other mailbox left blank.

Windows PowerShell, connected to Exchange Online
Set-CASMailbox -Identity scanner@example.com -SmtpClientAuthenticationDisabled $false

Microsoft recommends OAuth for devices and apps that connect. In place of SMTP AUTH with Basic authentication, it recommends High Volume Email for mail to internal recipients only, and Azure Communication Services Email for internal and external recipients.

Find who still uses it

The SMTP AUTH Clients report in the new Exchange admin center, under Reports, then Mail flow, lists the senders that used SMTP AUTH, with message counts and TLS versions. Its Authentication Protocol column reads Basic Auth (TlsAuthLogin) or Modern Auth (XOAUTH2). It shows the last 7 days by default, and up to 90 days.

Troubleshooting

A device cannot send although its mailbox allows SMTP AUTH
  • Security defaults are on, so SMTP AUTH is off in Exchange Online.
  • From the end of December 2026, Basic authentication for SMTP AUTH is off by default in existing organizations.
  • Microsoft's device settings are server smtp.office365.com, port 587 (recommended) or 25, and never an IP address for the server.

An Exchange Online authentication policy that blocks Basic authentication for SMTP also stops clients that sign in with a password, whatever the SMTP AUTH settings say; the switch is AllowBasicAuthSmtp. List the policies and the organization's default:

Windows PowerShell, connected to Exchange Online
Get-AuthenticationPolicy | Format-Table Name -Auto
Get-OrganizationConfig | Format-Table DefaultAuthenticationPolicy

Changes to authentication policies take effect within 24 hours.

Sources