95
Views
13
Comments
Exchange Online (OAuth2.0) Configuration - 535 5.7.3 Authentication unsuccessful

Hi all,

I need your input on a challenge I am facing.

Because of the retirement of basic auth for client submissions, we can no longer use the email feature in OutSystems with basic authentication. There we have upgraded our version to enable the Exchange Online (OAuth2.0) function.

We are now in the process of configuring OutSystems and Exchange Online in Azure. Although I believe the configuration in OutSystems is done correctly, according to the reference documentation below we still receive an error:

Error Message:

Error sending email 2653157: 535: 5.7.3 Authentication unsuccessful [DUZPR01CA0148.eurprd01.prod.exchangelabs.com 2025-06-05T05:53:19.152Z 08DDA3C6F28968E6]

Does anybody have a checklist of configuration settings that we can check in Azure to make sure also Exchange Online and the API permissions have been correctly configured?

Reference Documentation:

https://techcommunity.microsoft.com/blog/exchange/exchange-online-to-retire-basic-auth-for-client-submission-smtp-auth/4114750

https://success.outsystems.com/documentation/11/managing_outsystems_platform_and_application_lifecycle/configure_outsystems_to_send_emails/

Thanks for your help!

2019-01-07 16-04-16
Siya
 
MVP

@Teun van Bree : Please check if you have completed the following  steps at Azure Portal & Service Center.

  1. Application Registration :  Azure -> App Registration -> Add -> Give a Name + Accept Default settings. Once application is created , details page will give you the tenant id client id.
  2. Now Click on Certificate & Secrets and create a Client Secret and note down the value
  3. Now setup the API Permissions : API Permission -> Add a Permission -> APIs my organization uses - > Office 365 Exchange Online -> Application Permissions -> SMTP - > SMTP.SendAsApp. Also you need to add offline_access permission by Add a Permission -> Microsoft API - > Microsoft Graph -> Delegated Permissions -> search for offline_access and add
  4. Now Email Configuration with data from Step 1 & 2 . For SMTP Server set smtp.office365.com and port as 587.


2023-11-29 12-59-57
Anne de Swart

Hi @Teun van Bree,

Did you resolve your error yet? I'm facing the same issue. I have tried the solution mentioned by @Siya but no success.

2025-03-13 14-13-39
Bas van Dijk

@Teun van Bree @Siya Did you manage to set up the connection? I sent this over to our Azure Administrator, but we are still receiving the 535 5.7.3 Authentication Unsuccesful error,  so do you know if there are any other necessary configuration settings that we need to be aware of?

2023-11-29 12-59-57
Anne de Swart

@Bas van Dijk We managed to set up the connection! We have shared our information with OutSystems and they are currently updating their documentation. I don't know when it is ready for release, but they should be able to help you when you create a support ticket.

2017-11-07 08-23-52
Furkan Çetin

Hi @Anne de Swart,

Thanks for the update! That’s great to hear you managed to set up the connection. We are currently facing the same issue ourselves. Would you be able to share what steps or configuration changes solved the problem? It would be really helpful for us and others facing the same issue.

Thanks in advance!

2019-12-11 17-59-12
Nelson André

@Anne de Swart , I am also having the same issue. Could you share the fix, please?

UserImage.jpg
Matthew Fyleman

@Anne de Swart , I too am having this issue. Could you share your configuration here please, as I don't think that OutSystems support have updated their documentation yet.

UserImage.jpg
Tirza van der Wolf

@Anne de Swart We are also having the same issue. Could you please let us know how it was fixed? Even creating a support ticket did help in solving this issue.

2023-10-16 05-50-48
Shingo Lam

Please keep this topic opening till the documents are updated 

2025-03-13 14-13-39
Bas van Dijk

For everyone that is still struggling with this issue, my project did manage to solve it but I do not know exactly how. Another party managed the azure permissions of the system that we are using for the mailing, but this is the response that I got when he got it working:

 Yesterday we investigated the report and performed the following actions.

An Exchange Online service principal was created based on the app registration.

This was then added to the clientemail@placeholder.com mailbox.

We also added a management scope and a management role assignment to the app registration so that it is only possible to send mail using this mailbox.

The above steps could only be performed via PowerShell.

In addition, we cleaned up the API permissions so that only SMTP.SendAsApp remains.

I hope that this might be usefull for those who are still working on the OAuth2.0 mailing.

2023-11-29 12-59-57
Anne de Swart

Our solution included PowerShell as well! We have shared this with OutSystems so they should be able to help. In my opinion, they should provide support. I recommend to create support tickets and if that doesn't give you the information that you need, maybe escalate it to get it to a higher level. 

2018-06-04 08-06-09
Peter Van Den Ochtend

Hi all,

We were also struggling to get this working for two of our customers. Big thanks to Phaqt 💖 for pointing us in the right direction.

I’ve created a script that asks for the required information and checks all the settings (even can adjust AFTER confirmation!). This solved all our cases. I’ve put it in my repo: https://github.com/pvdochtend/SMTP-OAuth20-MicrosoftAzure-Testscript

I hope this will help you in the right direction also. Please let me know if this worked for you, or if you see any improvements!

2025-03-13 14-13-39
Bas van Dijk

If anyone is still struggling with getting the OAuth 2.0 working, there was an article posted on this subject through the OutSystems developer newsletter. 

https://medium.com/@bryanvillalobos17/outsystems-developer-cloud-how-to-setup-smtp-using-microsoft-365-exchange-online-b2a7b3b6644f 

I hope this helps!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.