cancel
Showing results for 
Search instead for 
Did you mean: 

S/4HANA Cloud: oAuth2 API call

Juwin
Active Contributor
0 Kudos

Hello,

Some of the APIs published on api.sap.com, require oAuth2 authentication. I am trying to understand how that can be enabled for S/4HANA Cloud. Most of the documentation that SAP has published, relates to extending a standard API on BTP and how that extension can call API using oAuth2 (https://help.sap.com/doc/6ce62b6bdda340ffbeae3f138c3cb71b/SHIP/en-US/Set_Up_Authentication_for_SAP_S4HANA_Cloud_Extensions.pdf).

Suppose, the standard API is to be called without using a BTP extension, how does oAuth2 work? How to setup communication arrangement, user & secret to enable oAuth2 API directly to S/4HANA Cloud, from any external system?

Since IAS is responsible for authenticating the users, is IAS setup required to enable oAuth2 API calls (https://help.sap.com/docs/IDENTITY_AUTHENTICATION/6d6d63354d1242d185ab4830fc04feb1/44b0d28cf4fa4fb29c3333e77bb719da.html)?

In ECC or OnPremise S/4HANA systems, there is a transaction code SOAUTH2 to setup Client ID for oAuth2 calls. What is the equivalent process for S/4HANA Cloud (not involving BTP extensions development)?

Thanks

JulianoRomanato
Product and Topic Expert
Product and Topic Expert

Hello juwin.thomas2.

How are you? I have included the Tag "SAP S/4HANA Cloud Extensibility" for this question, as API Calls related to SAP S/4HANA Cloud Extensibility.

Regards.

Juliano Romanato.

Marissa
Advisor
Advisor
0 Kudos

We helped you to accept the answer, since there were no updates after 7 days.

You can unaccept it anytime if you have further questions.

Accepted Solutions (1)

Accepted Solutions (1)

MartyMcCormick
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Juwin

Sorry, I had overlooked that link in your original post. The SOAUTH2 equivalent in S/4HC is in 5.3 with the setup of the comm user and comm arrangement.

You have a different service provider where the application lives (not BTP). What is the IdP of this app? The trust needs to be configured between S/4HC and this - basically you are doing 5.1 and 5.2 from the guide but not on BTP but your custom one. Do you have a specific scenario in mind for OAuth authentication inbound?

Marty

Juwin
Active Contributor
0 Kudos

We use SAP IAS as the IdP. The trust between IAS and S/4HANA Cloud system already exists and works for normal users.

Question is what setup do we have to do in IAS/S4H system to enable oAuth2 API calls from external systems.

Where do we generate the client Id & secret required by the external systems to connect? What will be the authorization url?

Answers (1)

Answers (1)

MartyMcCormick
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Juwin

You would configure OAuth with your IDP in this case instead of BTP. This guide provides a pretty good description of the steps required and uses the sales order comm arrangement as an example: https://help.sap.com/doc/6ce62b6bdda340ffbeae3f138c3cb71b/SHIP/en-US/Set_Up_Authentication_for_SAP_S...

Let us know if it helps.

Marty

Juwin
Active Contributor
0 Kudos

I had referred to that document earlier. I had provided the link to that document in my question as well. That document talks specifically about Extensions on BTP.

Could you please clarify which particularly section of the document should we refer to, for IDP setup related to direct connectivity scenario?

ipjao
Explorer
0 Kudos

hello Juwin,

I am having same scenario. Did they provide any answer on this? Thanks!

peter_munt4
Participant
0 Kudos
I also have the same type of question. I have a scenario working via OAUTH in POSTMAN - I followed Pascal's blog https://community.sap.com/t5/enterprise-resource-planning-blogs-by-sap/maintain-assignment-of-docume... but the IAS and S4HC scope popups are going to get in the way when a 3rd Party app wants to call our S4HC APIs. Did you get around that ? If so could you share?.