Error 1:
535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant.
Fix: Enable SMTP AUTH at tenant level (Exchange Admin Center)
Error 2:
535 5.7.139 Authentication unsuccessful, user is locked by your organization's security defaults policy.
Fix: Disable Security Defaults in Azure Portal OR exclude user from Conditional Access policies
Error 3:
535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully.
Fix: Enable SMTP AUTH for the specific mailbox
Error 4:
5.7.57 Client not authenticated to send mail.
Fix: Check all three layers (tenant, security policy, mailbox) + verify no MFA app is configured
IMPORTANT: Before starting, make sure the account you are adding for SMTP does not have Microsoft Authenticator app setup.
Wait 15 minutes and test. If it works, you're done! Otherwise, continue...
Wait a few minutes and test again. If still not working, continue...
Wait 15 minutes and test again. If still not working, continue...
You will see 4 default Microsoft-managed policies:
Wait 15 minutes and test. All errors should be resolved!
VERIFIED: These instructions were tested and confirmed working NOTE: No app passwords required for this configuration WARNING: Excluding users from Conditional Access policies reduces security for those accounts. Only use for service accounts with strong passwords. WARNING: Do not configure Microsoft Authenticator on the SMTP service account
Timestamp: Initial error
Error Message:
535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant.
Visit https://aka.ms/smtp_auth_disabled for more information.
What it means:
Solution Applied:
Root Cause: Microsoft disables SMTP AUTH by default for security reasons in newer tenants
Timestamp: After enabling tenant-wide SMTP AUTH
Error Message:
535 5.7.139 Authentication unsuccessful, user is locked by your organization's security defaults policy.
Contact your administrator.
What it means:
Solution Applied:
Root Cause: Security Defaults is Microsoft's baseline security policy that blocks basic authentication to prevent credential compromise
Security Note: After disabling Security Defaults, you should implement:
Timestamp: After disabling Security Defaults
Error Message:
535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully.
Contact your administrator.
What it means:
Solution Applied: Via Microsoft 365 Admin Center:
Root Cause: Even when SMTP AUTH is enabled tenant-wide, individual mailboxes can have it disabled. Microsoft implements this as a multi-layered security approach.
Symptom: SMTP AUTH fails even when all settings are correct Cause: Shared mailboxes may not support SMTP AUTH without a license Solution: Either assign a license to the shared mailbox OR convert to user mailbox
Symptom: Regular password fails authentication Cause: SMTP doesn't support interactive MFA prompts Solution: Create an App Password:
Symptom: Emails marked as spam or rejected by recipients Cause: Missing SPF, DKIM, or DMARC records Solution: Add proper DNS records:
v=spf1 include:spf.protection.outlook.com -allv=DMARC1; p=quarantine; rua=mailto:dmarc@domain.comMicrosoft 365 SMTP authentication has THREE layers that must ALL be enabled:
All three layers must be configured correctly for SMTP to work!
OAuth2 authentication approach: