cancel
Showing results for 
Search instead for 
Did you mean: 

Bad request error when calling SCIM

Sven_Lausen
Discoverer
0 Kudos
432

Dear SAP experts,

I tried to use the SAP AFC API using the description in this blog:

SAP Advanced Financial Closing: SCIM V2 | SAP Blogs

When I try to get the bearer token in a browser with the string

"https://easap-dev.authentication.eu10.hana.ondemand.com/oauth/token?grant_type=client_credentials"

I can enter the clientid and clientsecret in a popup (Username and Password). In this case I get the bearer token as a response.

But If I append clientid and clientsecret I will get a HTTP Status 400 Bad Request:

"https://easap-dev.authentication.eu10.hana.ondemand.com/oauth/token?grant_type=client_credentials&clientid=clientid&clientsecret=clientsecret"

I tried with clientid and client_id (same for the secret) but this did not help.

Could you please advise?

Thanks and kind regards

Sven

Accepted Solutions (1)

Accepted Solutions (1)

OliverKlemenz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Please use the following notation:

curl --request POST \
--url 'https://easap-dev.authentication.eu10.hana.ondemand.com/oauth/token' \
--header 'content-type: application/x-www-form-urlencoded' \
--data grant_type='client_credentials' \
--data client_id='<client-id>' \
--data client_secret='<client-secret>'

https://auth0.com/docs/get-started/authentication-and-authorization-flow/call-your-api-using-the-cli...

Alternatively, this works as well (setting authorization - basic auth)

curl --request POST \
--url 'https://easap-dev.authentication.eu10.hana.ondemand.com/oauth/token?grant_type=client_credentials' \
-u '<client-id>:<client-secret>'

Answers (1)

Answers (1)

Sven_Lausen
Discoverer
0 Kudos

Dear Oliver,

great! Thank you for the quick response, now it works!

KR

Sven