SAP Knowledge Base Article - Public

2760288 - LMS OData API Error - "Unauthorized access to record learning event"


Using the API to send completion status from an OCN provider to LMS is giving the following error:

     "errors": [
               "code": "500",
               "message": "Unauthorized access to record learning event",
               "fieldName": null
     "status": "FAILED",
     "operation": null,
     "data": null,
     "warnings": null


SuccessFactors LMS

Reproducing the Issue

  1. Generate an admin token type.
  2. Use it to call the API /learning/public-api/rest/v1/current-user/item/learning-event
  3. The error will happen.


This API was designed to work with user tokens only. Using an admin token type is what causes this error.


You must a use a user token type for this API to work. Also, the userID passed on the payload must be the same userID that was used to generate the token. For example, if you generate a token for user 'A' and tries to call the API passing a userID 'B', a different error will happen.


odata, api, ocn, error, failed, code 500, unauthorized , KBA , LOD-SF-LMS-ODA , Web Services OData , Problem


SAP SuccessFactors Learning 1811