Send Emails using smtp from own ERP system using oauth2

buchhaltung 5 Reputation points
2024-04-09T09:22:16.07+00:00

Dear Sirs and Madams,

I write you cause I'm lost in the docs. I am the creator of an erp system (interSales QuickStep) and two of my clients are using microsoft 365 and want to send emails through it. That is why I try to extend the erp with the possibility to send emails via microsoft smtp service using ouath2.

What I dont understand is how the auth flow must happen in such a scenario. I'd like to implement it the way thunderbird does it.

The user needs to "add an microsoft account" in the erp system. He then enters his email address, is redirected to the microsoft login page where he confirms the access rights and thats it - now the erp is able to send emails with this registered account.

What I dont understand here is how I need to register the app to get the neccessary tokens and ids. Would I use an own account to register the app to retrieve an app id etc. and then would be able to "add that app to the user account"?

Some information where to start and which steps are neccessary would be extremely helpful. My problems start with the fact that I'm absolutely not sure which auth flow to user for this scenario.

best regards,

Marco Westermann

Outlook Windows Classic Outlook for Windows For business
Microsoft Security Microsoft Authenticator
Microsoft Security Microsoft Graph
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.