Hi Frappe Team,
We are experiencing an issue integrating our Outlook email with Frappe/ERPNext when Two-Factor Authentication (2FA) is enabled.
When we enable 2FA for our Outlook account, the following error occurs while trying to connect and send emails:
smtplib.SMTPAuthenticationError: (535, b"5.7.139 Authentication unsuccessful, user is locked by your organization’s security defaults policy. Contact your administrator. [PN4P287CA0106.INDP287.PROD.OUTLOOK.COM 2025-05-05T11:50:31.678Z 08DD8B269CC3B10E]")
However, if we disable 2FA, the email connection works perfectly—emails are connected and sent without issues. This creates a serious security concern, as we are forced to disable 2FA just to ensure email functionality.
We have already verified login credentials and app password usage, but the issue persists with 2FA enabled.
Can you please advise if there is a secure way to connect Outlook email with 2FA enabled? Or is this a known limitation that Frappe is planning to resolve?