Fix it now · Microsoft Deadline Calendar
Send-MailMessage to smtp.office365.com stopped working
If a PowerShell provisioning script uses Send-MailMessage with a stored username and password against smtp.office365.com, it relies on SMTP AUTH Basic Authentication, which Microsoft disables by default for existing tenants at the end of December 2026. Move the script to OAuth-based sending or an approved relay, or stop emailing credentials and use self-service account claim.
Fix it now
- In the Exchange admin center, open the SMTP AUTH Clients Submission report and filter for Basic authentication to find every sender.
- Search your scripts for
smtp.office365.com,Send-MailMessage, and stored mail credentials. - Move each sender to OAuth. For internal-only bulk notices, evaluate Microsoft 365 High Volume Email. Hybrid campuses can relay through on-premises Exchange.
- Remove the stored password from the script and vault any remaining secret.
- Better yet: stop emailing passwords at all. Use first-time account claim so new users set their own credential.
- Microsoft considers
Send-MailMessageobsolete; replace it with an OAuth-capable method such as Microsoft GraphsendMail.
Why this keeps happening
Send-MailMessage was the easy way to send a notice from a script, so it is everywhere in campus automation. It only speaks the authentication method Microsoft is switching off. See the full Microsoft Deadline Calendar.
What breaks next
- NextEnd of Dec 2026SMTP AUTH Basic Authentication disabled by default for existing Exchange Online tenants (admins can re-enable for now)Who it hits: Scripts that email new-account notices viaSource: Microsoft Exchange Team blog: Updated SMTP AUTH Basic Authentication deprecation timeline (Jan 27, 2026)
smtp.office365.comwith a stored username and password - AnnouncedH2 2027Microsoft announces the final removal date for SMTP AUTH Basic AuthWho it hits: SameSource: Microsoft Exchange Team blog: Updated SMTP AUTH Basic Authentication deprecation timeline (Jan 27, 2026)
You'll fix this one. There are more coming.
Find your next break date in about five minutes. Your answers are scored in your browser.
Run the 5-minute Microsoft Deadline Check →Questions
Is Send-MailMessage itself being removed?
Microsoft has marked it obsolete for years and doesn't recommend it. The hard break is the authentication method, not the cmdlet.
Where else might this be hiding?
Scheduled tasks, SQL Agent jobs, copier/scan-to-email devices, and vendor apps that send on your behalf.
