Fix Exchange Online SMTP Authentication Blocked by Security Defaults
Question details
SMTP authentication fails with error 535 5.7.139 because Microsoft Security Defaults block legacy authentication, even when SMTP AUTH is enabled for an individual mailbox.

- Product
- Exchange Online
- Device & OS
- not provided
- Scenario
- A user or application is attempting to send emails using basic SMTP authentication via an Exchange Online mailbox, but the connection is rejected.
- Observed behavior
- The connection fails with error 535 5.7.139. Basic legacy authentication is globally blocked by Microsoft Security Defaults, overriding the individual mailbox's SMTP AUTH settings.
Verify whether your application or device supports modern authentication (OAuth 2.0). If it does, upgrading your authentication method is the most secure and recommended approach.
Configure a Microsoft 365 SMTP Relay Connector
Set up a connector in the Exchange admin center to relay mail using your organization's environment without relying on blocked basic authentication.
Microsoft 365 SMTP relay allows multifunction devices or applications to send emails without requiring legacy basic authentication. This method maintains your organization-wide Security Defaults while allowing mail flow.
Log in to the Microsoft 365 admin center using your administrator credentials, then navigate to the Exchange admin center.
In the left-hand menu, go to 'Mail flow' and click on 'Connectors'.
Click 'Add a connector'. Choose 'Your organization's email server' as the sending source and select 'Office 365' as the destination.
Enter the static public IP address of the device or application that will send the emails, or use a trusted SSL certificate to authenticate the connection.
Review your settings, save the connector, and ensure it is toggled to the 'Enabled' state. Update your application to route emails to the MX record endpoint (e.g., yourdomain-com.mail.protection.outlook.com) on port 25.

Upgrade to Modern Authentication (OAuth 2.0)
Reconfigure your application to authenticate via OAuth 2.0 instead of legacy basic authentication.
A Seamless and Lightweight Office Suite Alternative
If you want to avoid complex administrative configurations and security blocks like Exchange SMTP errors, consider switching to WPS Office for your local document needs. It is a highly compatible, free, and lightweight alternative that allows you to easily view, edit, and create Office documents with a familiar interface and zero IT overhead.
- 1. Download WPS Office: Visit the official WPS website to download the free installation package for your operating system.
- 2. Install the Suite: Run the installer to quickly set up the lightweight office suite on your device.
- 3. Open Your Documents: Launch WPS Office to instantly open, edit, and save your existing Microsoft Office files without formatting issues.

Frequently Asked Questions
Can I bypass Security Defaults to allow SMTP authentication?
While it is technically possible to disable Security Defaults at the organizational level to allow legacy authentication, Microsoft strongly advises against it as it leaves your tenant highly vulnerable to attacks. Using an SMTP relay or OAuth is the recommended approach.
Why does SMTP AUTH fail even when it is explicitly enabled for a specific mailbox?
Error 535 5.7.139 occurs because organization-wide policies, such as Security Defaults or Conditional Access, override individual mailbox settings. These policies proactively block the legacy basic authentication protocol used by traditional SMTP client submissions.
Does setting up a Microsoft 365 SMTP relay require an extra license?
No, configuring a Microsoft 365 SMTP relay connector does not require an additional license. However, the sending device or application must be authenticated via a static public IP address or a valid SSL certificate.




