Use Office 365 SMTP with external application / 535 5.7.139 Authentication unsuccessful

Daniel Vitek 1 Reputation point
2022-08-14T12:24:04.997+00:00

I have MFA enabled, trying to log in to SMTP server with app password, and still getting error.
535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. [VI1PR06CA0110.eurprd06.prod.outlook.com]
I tried everything I foundonline

  • MFA enforced for given user
  • Authenticated SMTP enabled
  • App password created
  • Even Security defaults are disabled

Using smtp.office365.com, port 587 with TLS.

Outlook | Windows | Classic Outlook for Windows | For business
Exchange | Exchange Server | Management
{count} votes

2 answers

Sort by: Most helpful
  1. JamesTran-MSFT 36,911 Reputation points Microsoft Employee Moderator
    2022-08-15T22:39:02.807+00:00

    @Daniel Vitek
    Thank you for your detailed post!

    I found a related issue answered by @Kael Yao and will post the solution shared below.

    -----------------

    535 5.7.139 Authentication unsuccessful:
    There may be two possible causes for this issue.
    Please refer to this link and check point 3 (Azure Security Defaults) and point 4 (Conditional Access policy): Error: Authentication unsuccessful

    123478-08.jpg

    These settings would block Legacy Authentication.

    --------------------------

    I hope this helps!

    If you have any other questions, please let me know.
    Thank you for your time and patience throughout this issue.

    ----------

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    1 person found this answer helpful.
    0 comments No comments

  2. Carlos Solís Salazar 18,196 Reputation points MVP Volunteer Moderator
    2022-08-14T16:04:00.007+00:00

    Hi @Daniel Vitek

    Thank you for asking this question on the **Microsoft Q&A Platform. **

    It looks like the user has the MFA active.

    In your Azure AD you can review the Sign-In logs for the user
    231032-image.png

    You can disable the MFA for that user or even better use the following method "Authenticate an IMAP, POP or SMTP connection using OAuth"

    Hope this helps,
    Carlos Solís Salazar

    ----------

    Accept Answer and Upvote, if any of the above helped, this thread can help others in the community looking for remediation for similar issues.
    NOTE: To answer you as quickly as possible, please mention me in your reply.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.