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...
Steve Peschka
Mar 01, 2018Copper Contributor
If you have an Azure AD app registration with permissions to send mail on behalf of a user, you can get an access token for that user and use it for such purposes. The token is acquired during an interactive login, so MFA is supported, and then you can use that token to send email via the Office 365 REST API (and to a lesser extent, Microsoft Graph). We have solutions that do this in exactly this scenario and work fine with MFA secured accounts.