SAP Knowledge Base Article - Public

2683523 - Error 'Not Authorized: Check Authorization Restriction for the User' When Querying Odata Collection

Symptom

You receive the error 'Not Authorized: Check Authorization Restriction for the User' when trying to retrieve data from Employee collection via Odata services.

Obs.: This error can also occur when trying to retrieve data from other work centers / views.

Environment

SAP Hybris Cloud for Customer.

Reproducing the Issue

Open an URL from EmployeeCollection and the error will occur.

Cause

This is the standard behavior. The user is not able to retrieve data from Employee Collection because they don't have the view of Administrator -> Employees assigned.

Resolution

The user might have the view of People -> Employees assigned, but for accessing Employee Collection via Odata it is required to have the view of Employees from Administrator work center assigned:

  1. Go to the Administrator work center.
  2. Open the Business Users view.
  3. Select the required user.
  4. Click on Edit -> Access Rights.
  5. Go to the Work Center and View Assignment tab.
  6. Expand the work center SEODADMINWCF / Administrator.
  7. Assign the view BPM_EMPLOYEES / Employees to the user.
  8. Save it.

Now the user should be able to access the Employee Collection without errors.

Obs.: If the error occurs for other collections, the same solution of assigning access to the required view should apply.

Keywords

not authorized; odata collection; authorization; , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem

Product

SAP HYBRIS C4C CORE all versions