How to Fix SMTP Error 535 5.7.139 Authentication Unsuccessful and Account Locked
Question details
The user is encountering an SMTP authentication error (535 5.7.139) stating the account is locked when connecting from a specific secondary server, while the connection works successfully from another IP address.

- Product
- Email Server / Microsoft 365 Exchange
- Device & OS
- not provided
- Scenario
- Attempting to send an email or authenticate an SMTP connection from an alternate server IP address.
- Observed behavior
- SMTP authentication is successful from the primary IP address but fails from the alternate server with the error message: SMTP Error 535 5.7.139 Authentication Unsuccessful and Account Locked.
Ensure you have the exact IP addresses of both the working and failing servers, and confirm that you have global administrator access to review backend security policies.
Review Conditional Access Policies and Sign-in Logs
Check your organization's admin center for access policies that might be explicitly blocking the alternate server's IP address.
In many modern email environments, security policies restrict logins to known networks. When an authentication attempt comes from an unrecognized server IP, the system blocks the connection and triggers an account locked error to prevent unauthorized access.
Access your organization's administrative console (such as Microsoft Entra ID or the Exchange Admin Center) using global administrator credentials.
Navigate to your organization's Sign-in logs. Filter the logs by the affected user account and the failing alternate IP address to identify the specific policy denying access.
Go to Security > Conditional Access. Look for policies configured to restrict access based on location, IP address ranges, or unrecognized devices.
If the alternate server is secure and authorized, add its IP address to your trusted locations list or configure an exclusion in the conditional access policy.

Collect Configuration Details for Escalation
If you cannot modify policies or locate the blocking rule, gather detailed configuration logs to escalate to your email service provider.
Boost Your Productivity with WPS Office
While troubleshooting backend server and SMTP configuration issues, ensure your daily document workflows remain uninterrupted. WPS Office offers a free, lightweight, and powerful suite to create, edit, and manage your documents seamlessly.
- 1. Download the Installer: Visit the official WPS website to download the free installation package for your operating system.
- 2. Install WPS Office: Run the downloaded file and follow the on-screen prompts to complete the installation in minutes.
- 3. Open and Edit Documents: Launch WPS Office to instantly open your existing Microsoft Office files and start working without format loss.

Frequently Asked Questions
Why does SMTP Error 535 5.7.139 occur?
This error typically happens when an email server's security configurations, such as Conditional Access policies or disabled Basic Authentication, block a sign-in attempt from a specific IP address or unrecognized device.
Can I fix the account locked error without administrator rights?
No. Resolving this error usually requires a global administrator to review sign-in logs and adjust IP whitelisting or conditional access policies within the administrative center.
Why does SMTP authentication work on one IP but fail on another?
Organizations often configure security policies to allow authentication only from known corporate networks or trusted locations. If the secondary IP is not recognized as a trusted location, it will be automatically blocked by the server.




