Forum Discussion
Jeff Harlow
Feb 23, 2018Iron Contributor
Send Mail (SMTP) through Office 365 with MFA
We have a web server that needs to be able to send emails as users (FROM field); however, we have noticed that if the user account is protected with MFA, the message is rejected. Has anyone been abl...
Szymon_B_InfoSense
Feb 24, 2021Copper Contributor
Jeff Harlow I was struggling with that too. Finally I found a solution which requires to change properties in Azure Active Directory (Properties > Manage Security Defaults). You have to turn off "Enable Security defaults" like at the linked screenshot from https://docs.microsoft.com/en-gb/azure/active-directory/fundamentals/concept-fundamentals-security-defaults
The starting point to find that solution was Microsoft 365 Admin Center > Settings > Org settings > Services > Modern authentication. The link to the above mentioned documentation is provided in description of Modern authentication.
Now I'm able to send emails by SMTP protocol with using an app password from MFA enabled account.