Find-SmtpAuthExposure

1.0.1

Answers one question before December 2026: which mailboxes in this tenant
can still send with a username and password, and will therefore stop when
Microsoft disables SMTP AUTH Basic authentication by default at the end of
that month. Printers, scanners, MFPs, NAS units and scripts are what break,
and the error they will report is 535 5.7.139.

Read-only. The script q
Answers one question before December 2026: which mailboxes in this tenant
can still send with a username and password, and will therefore stop when
Microsoft disables SMTP AUTH Basic authentication by default at the end of
that month. Printers, scanners, MFPs, NAS units and scripts are what break,
and the error they will report is 535 5.7.139.

Read-only. The script queries configuration and prints a report; it never
changes a setting, so it is safe to run against production before you have
decided anything.

The reason a script is needed rather than one Get-CASMailbox call is that
SmtpClientAuthenticationDisabled is tri-state, and the middle state is the
one that catches people out:

   $true   SMTP AUTH explicitly blocked for this mailbox
   $false  SMTP AUTH explicitly allowed for this mailbox
   $null   inherit the tenant-wide setting

A mailbox showing $null looks harmless in a spreadsheet and is in fact
fully exposed whenever the tenant allows SMTP AUTH. Filtering only on
`-eq $false`, which is the usual advice, silently misses every one of them.

Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Find-SmtpAuthExposure

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

MIT

Package Details

Author(s)

  • msgwing.com

Tags

SMTP SMTPAUTH SmtpClientAuthentication BasicAuthentication ExchangeOnline Microsoft365 Office365 Audit ReadOnly Deprecation Relay Printer MFP Scanner 5.7.139

Functions

Write-Section

Dependencies

This script has no dependencies.

Release Notes

Initial release. Reports which Exchange Online mailboxes can still authenticate
with SMTP AUTH before Microsoft disables Basic authentication for it by default
at the end of December 2026. Read-only.
Handles all three states of SmtpClientAuthenticationDisabled, including $null
which inherits the tenant setting - the state that the commonly repeated
`-eq $false` filter misses entirely.

FileList

Version History

Version Downloads Last updated
1.0.1 (current version) 4 8/27/2026
1.0.0 5 8/26/2026