2023 Jan 03 9:50 AM
Hi experts
Has anyone managed to Connected their ABAP system to Microsoft Exchange Online with the use of oAuth2?
I have tried - but to mee it seems that each user has to logon? Of course that solution is not durable.
What i basiccaly need, is to write a small ABAP program that creates a Calendar entry in a users Outlook.
This has been working without problems until now with Basic Authentification - but that is not allowed anymore (MS decission)
2023 Jan 06 6:23 AM
Actually did find the solution my self. First i tried the "Standard" way like this:
But could´nt get i to work.
So i did the simple way:
First i call https://login.microsoftonline.com/<tenent>/oauth2/v2.0/token?
Providing client_id, scope, client secret and grant type (client_credential)
By this i get an token code
This i use in HTTP header "Authorization" of actual call. Value = Bearer <Token Code>
And of course calls are done with cl_http_client
2023 Jan 06 5:03 AM
I don't know an answer but there are many SAP/Microsoft enthusiasts in the community, so maybe one of them, like hobruche could help? If you're on Twitter, we have a list there too. And there is this GitHub page.
2023 Jan 06 6:23 AM
Actually did find the solution my self. First i tried the "Standard" way like this:
But could´nt get i to work.
So i did the simple way:
First i call https://login.microsoftonline.com/<tenent>/oauth2/v2.0/token?
Providing client_id, scope, client secret and grant type (client_credential)
By this i get an token code
This i use in HTTP header "Authorization" of actual call. Value = Bearer <Token Code>
And of course calls are done with cl_http_client
2024 Jan 31 10:51 AM - edited 2024 Jan 31 10:55 AM
Always good to hear back you were able to solve and how @jakob_steen-petersen 🙂 did you consider using or at least getting inspired from the ABAP SDK for Azure to integrate with Microsoft Graph API? If not, why?
Also want to make you aware we keep our docs for the support auth setup for Exchange Online and SAP here.
KR Martin