cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

OAuth2 - invalid request - due to missing parameter/wrong value

geert_nackers3
Explorer
0 Likes
1,950

Hi,

I'm trying to implement an OAuth2 service which will allow to read data from an external application.

This works as expected via another tool like Postman. Also the google caledar OAuth2 service was implemented in SAP as a test.

However, the OAuth2 service that I need, fails. I succeed in retrieving the code, but when using the code to get the token, an "invalid request" error is generated.


The follwing is the result from a working call in Postman. ( The yellow arrow to indicate that in the next screenshot, there is a dfference )

I was able to reproduce the same (I hope) error in Postman by changing the Client Authentication from "Send client credential in body" to "send as Basic Auth Header.

Which resulted in the error - invalid request

In SAP - I've tried to change the settings in OA2C_CONFIG, but no succes.

Already did some debug, checked HttpWatch traces, implemented a whole series of notes, read info like

https://help.sap.com/docs/ABAP_PLATFORM/e815bb97839a4d83be6c4fca48ee5777/7573ffc0ae444443a23b9e661d7...

https://launchpad.support.sap.com/#/notes/1688545 containing

It is the above that makes me believe that the auth method that is provided in SAP is incorrect and generates the issue as is simulated in Postman.

However I can't find the setting/ change so that the client_secret becomes a body parameter and the basic auth component is removed form the http request header.

Does anyone have an idea as to where I can continue searching?

Thanks

Accepted Solutions (0)

Answers (0)