Symptom
Attempting to use OData API to make a call and receive the error: "Invalid OAuth Request to the protected resource".
Environment
SAP SuccessFactors Learning
Reproducing the Issue
- Call the authorization token >
- Make the API call with the token >
- Receive the error.
Cause
The cause of the error is due to using an API call with the incorrect token.
Resolution
Please check the OData API documentation for the API call that you are making. Please check documentation to make sure that you are using the proper call with the proper token.
It won't be possible to make a call such as "GET /learning/odatav4/public/admin/userService/v1/$metadata", but with a token generated for "userType":"user".
In this case, your token was generated for a "user", then you would use the proper call "GET /learning/odatav4/public/user/itemAssignment/v1/$metadata".
Note: If the authorization wasn't added before running the API, "Invalid OAuth Request to the protected resource" can occur as well.
See Also
Keywords
LMS, OData API, Invalid OAuth Request, protected resource, SAP SuccessFactors Learning Management System, LMS, IDM, Success, OA2 , KBA , LOD-SF-LMS-ODA , Web Services OData , LOD-SF-LMS , Learning Management System , Problem
SAP Knowledge Base Article - Public