Skip to Content
Apr 07, 2020 at 01:51 PM

CPI OAuth credentials in Camel Case notation

343 Views Last edit Apr 07, 2020 at 01:52 PM 2 rev

We like to call an webservice secured by OAuth (client credential/bearer token). In the past therefore I used the "OAuth credential"-type of SAP CPI which does an excellent authentication handling.

Now we have a service which expects the following message on the token endpoint:

    "clientId": "asdfghjklö",
    "clientSecret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "grantType": "client_credentials",
    "scope": "myscope anotherscope"

While sniffing the auth request from CPI's OAuth credential pair (via, I figured out it sends the request in the following way:

  "grant_type": "client_credentials",
  "scope": "myscope anotherscope",
  "client_id": "asdfghjklö",
  "client_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

So SAP CPI uses underscore notation (e.g. client_id) whilst the target webservice expects camel case (e.g. clientId). Is there any option/service request/header etc. we can set, so that SAP CPI uses also camel case notation for the OAuth request?

Otherwise we had to call the token manually like back in the days where the OAuth credential type wasn't available. But I like to avoid this.