Symptom
When you are trying to make a call from external system to Cloud for Customer, you are getting the error, Unauthorized: The service 'c4codataapi' is not assigned to you
Environment
SAP Cloud For Customer
Reproducing the Issue
- Go to Adminstrator -> General Settings.
- Open Odata API Monitor and you can see the Corresponding error.
Cause
You can only access the URL of the OData Services, which was assigned in the Communication Arrangement.
If you are using a technical user, then you are not allowed to use endpoint "/sap/c4c/odata/v1/c4codataapi" because you cannot assign the authorization for this URL in communication arrangement.
For technical-user, csrf-token is not required for POST/PATCH/PUT and DELETE operations.
Resolution
You need to use specific endpoints like follow(can be copied from communication arrangement)
- https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/$metadata
- https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/$metadata?$filter=Visit
- https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/activity/$metadata
Keywords
Communication arrangement, Authorization error, Odata, OdataAPI , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem