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.
SAP Hybris Cloud for Customer.
Reproducing the Issue
Open an URL from EmployeeCollection and the error will occur.
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.
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:
- Go to the Administrator work center.
- Open the Business Users view.
- Select the required user.
- Click on Edit -> Access Rights.
- Go to the Work Center and View Assignment tab.
- Expand the work center SEODADMINWCF / Administrator.
- Assign the view BPM_EMPLOYEES / Employees to the user.
- 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.
not authorized; odata collection; authorization; , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem