Both Microsoft and Google have stopped allowing basic authentication. How can we configure the OS Platform to send emails using the new requirements. For reference, here is the MS note: https://support.microsoft.com/en-us/office/modern-authentication-methods-now-needed-to-continue-syncing-outlook-email-in-non-microsoft-email-apps-c5d65390-9676-4763-b41f-d7986499a90d
Hi @Stacey Levine,
Using oAuth2 we can do it.
1. Configuring Office 365 (Microsoft Exchange) with OAuth2
Step 1: Register Your Application in Azure Active Directory (Azure AD)
Step 2: Add API Permissions
Step 3: Create a Client Secret
Step 4: Acquire OAuth2 Token Programmatically in OutSystems
Implement the OAuth2 flow in OutSystems to acquire the Access Token using the Authorization Code grant type.
Where {tenant} is your Azure AD tenant ID.
You’ll need to send the following parameters in the request body:
Step 5: Configure SMTP in OutSystems
Once you have the OAuth2 token, configure OutSystems email sending using the following details:
2. Configuring Gmail with OAuth2
Step 1: Create a Google Cloud Project
Step 2: Enable Gmail API
Step 3: Generate OAuth2 Credentials
Step 4: OAuth2 Flow in OutSystems
Use OutSystems to call Google’s OAuth2 token endpoint:
bashCopy codehttps://oauth2.googleapis.com/token
The request body should include:
Handle the token acquisition and use the Access Token for subsequent requests.
Once you acquire the OAuth2 token, configure the SMTP settings in OutSystems:
Unfortunately, there is no token authentication option:
Hi Rammurthy,
Thank you for explaining the steps in detail for oAuth2 authentication.
We've configured oAuth2 in Service Center and it does generate a token when tested. Where to use this token while sending emails in Step 5, if you could explain please.
Hello Stacey,The link you provided seems to be related to the end of support for Basic Authentication in Microsoft Outlook, the email client.I think this one about deprecating Basic Authentication support in Exchange Online would be relevant for those using Microsoft365 SMTP services and they suggest an alternative.https://techcommunity.microsoft.com/t5/exchange-team-blog/exchange-online-to-retire-basic-auth-for-client-submission-smtp/ba-p/4114750
For this use case, we have been using the free outlook.com email accounts. With those accounts, I can't find a way to do what the links you have provided suggest. Those all appear to be for paid email accounts only.
You are right and I wrongly assumed that that the only Microsoft option would be Microsoft36.If you are looking to keep it free and you have very low usage there are some email services with free plans that allow SMTP relay, with limits on the daily sending.
Hi Stacey,
You need to use the Microsoft Graph api to send the emails and disable the built in email sent on service center servers tab
Check out here the how to start
https://itnext.io/getting-started-with-outsystems-and-microsoft-graph-123006356d41
Regards
Part of the reason for this post is that I should be able to use the built in functions. I was trying to avoid going the route of creating my own email function. I can, but that means that this feature is no longer useful
Hello Stacey.
Even though that Microsoft removed the possibility to do basic authentication, luckily, google is still allowing authentication with app passwords. And as far as I saw, there are no plans to remove this auth method. Please refer to: https://support.google.com/a/answer/14114704?hl=en
Nevertheless I would expect that in the future google will also stop allowing it.Let's hope that this gives enough time to Outsystems to allow built-in authentication with OAuth :) . It would be very handy to say the least ;)
Best regards,
Ben