Symptom
After the b1811 release you are observing the following error message in your OAuth2 response with HTTP 401 Unauthorized error:
- [LGN0004]You are not allowed to access OData APIs using Basic Auth or OAuth on a non-API server. To do this, you need to switch to the corresponding API server. For a list of available servers, visit https://help.sap.com/viewer/d599f15995d348a1b45ba5603e2aba9b/latest/en-US/03e1fc3791684367a6a76a614a2916de.html.
Environment
SuccessFactors OData API - OAuth2
Reproducing the Issue
-
Generate your assertion and access_token
- Login with your Bearer
- Observe the error in the response
Cause
The session ID kept in the tools (like postman web version) or middlewares will need to be renewed to reach our correct loadbalancer and API server.
Resolution
If you are using postman web version, then you need to use the desktop version.
In the desktop version you will have button to set or remove the jessionid inside cookie as below screenshot:
Similar solution should be applied for different tools and middlewares.
Keywords
-
OData API, SuccessFactors, OAuth2 authentication issue, HTTP 401 Unauthorized, LGN0004, [LGN0004]You are not allowed to access OData APIs using Basic Auth or OAuth on a non-API server. To do this, you need to switch to the corresponding API server. For a list of available servers, visit https://help.sap.com/viewer/d599f15995d348a1b45ba5603e2aba9b/latest/en-US/03e1fc3791684367a6a76a614a2916de.html.
Product
SAP SuccessFactors HCM Suite all versions