Forum Discussion
CerarP
Sep 14, 2022Copper Contributor
SMTP XOAuth authentication and Microsoft authentication libraries
Due to the upcoming deprecation of basic authentication our company is looking to move all our products to modern authentication protocols for sending emails but we have some unusual usage scenarios ...
CerarP
Sep 20, 2022Copper Contributor
I managed to find a solution for personal Microsoft accounts. Sending from those accounts requires these two settings enabled in app registration in Azure:
Advanced settings
Live SDK support
Allow direct integration with the Microsoft account service (login.live.com).
Required for integration with Microsoft account SDKs such as Xbox or Bing Ads
Required for integration with Microsoft account SDKs such as Xbox or Bing Ads
Allow public client flows
Enable the following mobile and desktop flows:
- No keyboard (Device Code Flow) Learn more
The first one is logical and I had it on from the start, the second one however makes no sense since I am using authorization code flow, but turning it on allows sending over SMTP from personal accounts.
One big catch after all this trouble and a week of trying to figure out how to get around the rigid implementation of authentication libraries and lack of proper documentation:
Sending over SMTP using OAuth 2.0 still requires office 365 users to disable security defaults and enable SMTP Authentication!!!
This makes no sense and is definitely not an improvement on security. Documentation on basic authentication deprecation states that we need to migrate to secure authentication flows but using OAuth on SMTP requires clients to enable basic authentication as well. I know they can be disabled separately by an admin and only XOAUTH left enabled but that is complicated and completely unnecessary. SMTP with XOAuth authentication should be enabled by default. All this does is force us to use Graph API to send emails, which is in no way related to security. If every email provider decided we have to use their APIs to send emails and not a standard protocol, we would need a new developer just for implementing sending emails which should be a trivial matter.
CerarP
Mar 01, 2024Copper Contributor
1.5 years later I am still waiting for anyone to explain the logic behind this. If we follow the instructions to implement OAUTH2 due to security concerns, why does it still require to enable SMTP Authentication which also enables basic authentication???