SAP Knowledge Base Article - Public

2335909 - OData API-Invalid OAuth Request to the protected resource

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 Management System (LMS) - All Supported Versions since b1605

Reproducing the Issue

  1. Call Authorization Token
  2. Make API Call with Token
  3. Receive the error

Cause

The cause of the error is due to using an API call with the incorrect token with an incorrect call.

Resolution

Please check the OData API documentation for the API call that you are making.

Making a call such as GET /learning/odatav4/public/admin/userService/v1/$metadata but with a Token called with a TypeID of User, will not allow the User to look at the results, as they are protected.

In this case your token was called by TypeID of User, then you would use the proper call GET /learning/odatav4/public/user/itemAssignment/v1/$metadata

Please check documentation to make sure that you are using the proper call with the proper token.

See Also

SAP SuccessFactors HCM Suite OData API: Reference Guide

Keywords

LMS, OData API, Invalid OAuth Request, protected resource SAP SuccessFactors Learning Management System (LMS) - All Supported Versions , KBA , LOD-SF-LMS-ODA , Web Services OData , Problem

Product

SAP SuccessFactors Learning all versions