Skip to main content

Command Palette

Search for a command to run...

Export SMTP Client Submission (SMTPAuth) usage with PowerShell

Updated
2 min read

As announced by Microsoft, SMTP Basic Authentication will be disabled in September 2025. While many are aware of this through the Message Center or Microsoft's recent blog post, this article focuses not on alternatives for applications and devices still using SMTP Basic Authentication, but rather on how to identify whether SMTP Auth is still in use within a tenant by using PowerShell. If you're a CSP looking to determine which of your customers still rely on this protocol, this guide is for you.

Microsoft provides a report within the Exchange Admin Center (EAC) to monitor SMTP AUTH client usage. However, manually checking each tenant can be cumbersome, especially if you manage hundreds of tenants, as my current employer does.

Fortunately, the Exchange Online PowerShell module offers a cmdlet, Start-HistoricalSearch, that can yield similar results. Although the documentation doesn't explicitly mention a report type for SMTP Auth, some investigation into the network traffic sent by the EAC reveals an undocumented report type called SmtpCSReport.

By utilizing this report type with the Start-HistoricalSearch cmdlet and adding the necessary parameters, you can initiate the export of the SMTP Auth usage report:

Start-HistoricalSearch -ReportTitle "SMTPAuth" -ReportType "SmtpCSReport" -StartDate (Get-Date).AddDays(-89) -EndDate (Get-Date)

You can monitor the status of the report with the following command:

Get-HistoricalSearch | where -Property ReportType -eq "SmtpCSReport"

Once the report is completed, the resulting file can be downloaded using the URL found in the FileUrl attribute. However, if your primary concern is simply identifying which customers are still using the soon-to-be-deprecated protocol, without needing specific user data or usage frequency, you can extract the relevant information directly from the Rows attribute without downloading the full report:

JobId                                SubmitDate          ReportTitle Status Rows
-----                                ----------          ----------- ------ ----
048e3455-dcf6-48ad-ad22-4d4a696f3fd5 28.08.2024 13:01:01 SMTPAuth    Done   8603

If you manage numerous customers, consider running these tasks in parallel or processing them in batches, as the *-HistoricalSearch commands can take a significant amount of time to complete. However, be aware that each time you connect to EXO, PowerShell loads the entire module for each customer or job. This can quickly consume a substantial amount of memory in your PowerShell session—something I discovered firsthand.