Skip to Content

SAP Cloud Platform . Java - AuthenticationHeaderProvider API - Setting Email as nameId

Apr 04, 2017 at 05:05 PM


avatar image


I want to authenticate against the SAP Jam Rest API using the SAP Identity provider.

To forward the user that has logged in via the IDP I tried to use the

AuthenticationHeaderProvider API.

Sadly my Jam tenant returns a 401 Http Status.

The error message is: Could not retrieve OAuth 2.0 access token for user C5*****

I know that SAP Jam needs the email address and not the the SAP user id to authenticate a user. I actually thought this was set by the "nameIdFormat" and "userIdSource" paramter of the DestinationConfiguration.

I followed this example to set up the DestinationConfiguration:

If you have any suggestion how to fix this issue I would be very thankful.

Kind regards,


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Jonas Roeder
Apr 06, 2017 at 12:17 PM

I figured out that this error is caused due to the configuration oft the Identity Provider.

The IDP sends the user Id instead of the E-Mail address as the name id.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

hum, how did you fix it then? Thanks!