- A Conditional Access policy blocks legacy authentication, or requires MFA, a compliant device or a trusted location.
- Per-user MFA is enabled for the account.
535 5.7.139: Sign-in blocked by Conditional Access or MFA
Microsoft 365SMTPSign-in problem
The error usually looks like this:
What it means
The password was accepted, but a Microsoft Entra policy – usually Conditional Access or multi-factor authentication – prevented the sign-in.
Common causes
How to fix it
- Check the user’s sign-in logs in the Microsoft Entra admin center to see which policy blocked the sign-in.
- Use OAuth 2.0 sign-in instead of a password. Auth-Email signs in with OAuth (completing MFA once in the browser) so that your app does not need to.
Tools to help diagnose it
Can’t update your app to use OAuth?
Auth-Email fixes sign-in errors like this one without changing your app, printer, scanner or script. It signs in to Microsoft 365 with OAuth on your app’s behalf, while your app keeps using a normal username and password over IMAP, POP or SMTP.