Microsoft's multi-year retirement of Basic Authentication for SMTP AUTH (smtp.office365.com) reaches a major enforcement milestone at the end of December 2026: SMTP AUTH Basic Authentication will be disabled by default across existing Exchange Online tenants.
While administrators will retain a temporary opt-in override until final cutoff in H2 2027, leaving legacy printers, scanners, ERP servers, or PowerShell Send-MailMessage scripts on Basic Auth puts your organization at risk of sudden mail-flow outages—and leaves password-based legacy endpoints exposed to credential stuffing.
In this runbook, we show how to audit every client still using SMTP AUTH Basic Auth via Entra ID Sign-In Logs and Exchange Online, and map out the three supported migration paths.
SMTP AUTH Basic Auth Migration Decision Flow
Step 1: Audit Active SMTP AUTH Basic Auth Clients via Microsoft Graph
Before disabling Basic Auth, query Entra ID Sign-In Logs (AuditLog.Read.All) for the past 30 days to find every account and IP address authenticating with Authenticated SMTP:
#Requires -Modules Microsoft.Graph.Authentication
Connect-MgGraph -Scopes "AuditLog.Read.All", "Directory.Read.All"
$StartIso = (Get-Date).AddDays(-30).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
$Uri = "https://graph.microsoft.com/v1.0/auditLogs/signIns?`$filter=createdDateTime ge $StartIso and clientAppUsed eq 'Authenticated SMTP'&`$top=500"
$Events = [System.Collections.Generic.List[object]]::new()
do {
$Resp = Invoke-MgGraphRequest -Method GET -Uri $Uri
if ($Resp.value) { $Events.AddRange($Resp.value) }
$Uri = $Resp.'@odata.nextLink'
} while ($Uri)
$Events | Group-Object userPrincipalName, ipAddress |
Select-Object Count,
@{ Name = "UserPrincipalName"; Expression = { ($_.Name -split ", ")[0] } },
@{ Name = "SourceIP"; Expression = { ($_.Name -split ", ")[1] } } |
Sort-Object Count -Descending |
Export-Csv ".\SMTP-BasicAuth-Audit.csv" -NoTypeInformation -Encoding UTF8
Write-Host "[+] Found $($Events.Count) Authenticated SMTP sign-ins." -ForegroundColor Cyan
Step 2: Check Which Mailboxes Currently Have SmtpClientAuthenticationDisabled = $false
In Exchange Online PowerShell (ExchangeOnlineManagement v3+), list mailboxes that still allow per-user SMTP AUTH:
Connect-ExchangeOnline -ShowBanner:$false
# Check tenant-wide setting
Get-TransportConfig | Select-Object SmtpClientAuthenticationDisabled
# Find mailboxes with per-mailbox override enabled
Get-CASMailbox -ResultSize Unlimited |
Where-Object { $_.SmtpClientAuthenticationDisabled -eq $false } |
Select-Object DisplayName, PrimarySmtpAddress, SmtpClientAuthenticationDisabled |
Format-Table -AutoSize
Step 3: Lock Down SMTP AUTH Once Migrated
After migrating scripts to Send-MgUserMail (Microsoft Graph) or High Volume Email (HVE), disable SMTP AUTH globally and block it via Conditional Access:
# Disable SMTP AUTH tenant-wide
Set-TransportConfig -SmtpClientAuthenticationDisabled $true
# Re-enable ONLY for a specific service account migrating to OAuth SMTP
Set-CASMailbox -Identity "[email protected]" -SmtpClientAuthenticationDisabled $false
For step-by-step migration of legacy PowerShell Send-MailMessage scripts to Graph API, see our Migrating PowerShell 5 to 7 & Microsoft Graph SDK Guide.