cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi All,

I am trying to generate OAuth2 Token from Salesforce using Grant Type as 'Authorization Code'. I have all the details, which I believe I need from Salesforce, and I can generate a token from POSTMAN successfully.

However, I am unable to do the same from SAP CPI.

Facing following issues:

1. While deploying OAuth2 Authorization Code, I can't change the PROVIDER. By default the provider is Microsoft 365. Screenshot attached.

2. I have deployed another Security Material of type User Credentails and used that Name in the User Name field while creating OAuth2 Authorization Code. Is the correct?

3. The Scope I entered is 'api full' - Hope that is fine.?

4. If this gets deployed successfully (hopefully), can I generate the Token from here? I do get option to Authorize after deploying (which is not right at the moment) - refer to screenshot

I tried to capture as much details as possible here and also on the screen print attached.

Details available from Salesforce Sandbox: Authorize URL, Token URL, Callback URL, Client ID, Client Secret, Sandbox Username, Sandbox Password

Any help would be highly appreciated!

-Anuj

Problem after deploying the OAuth2 Auth Code:

Authorization Code page with details to enter:

0 Likes
View Entire Topic
sunny_kapoor
Product and Topic Expert
Product and Topic Expert

Hi anuj.dulta

OAuth2 Authorization Code is not explicitly supported from creating Security Artifact perspective in SAP Cloud Integration other than for Microsoft 365.

User Credentials type would also not help you here.

You need to check and validate if you can achieve this by performing two calls in an integration flow, one to fetch the authrization code and other call where you can pass the code.

Regards,

Sunny

0 Likes
Hi Sunny,

Thanks for your reply. This is helpful!

There is also no way to test the Connection with Authentication 'OAuth Authorization Code' from the Cockpit.

There is no option for that. Is my understanding right there?

Thanks again!

sunny_kapoor
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi anuj.dulta,

Yes, as per the screenshot it doesn't look like we have an option for "OAuth Authorization Code" under Destination Configuration.

But one thing to highlight here, SAP Cloud Integration do not support usage of configured destination as of today. So even if you would be able to create a destination, it cannot be used inside the integration flow.

Regards,

Sunny