SAP Knowledge Base Article - Public

3275169 - Authorization Error When trying To Call The Tasks Collection Using OData

Symptom

Customer is trying to call the task collection using URL https://myxxxxxx.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/TasksCollection and is receiving the following error.
"Unauthorized: The service 'c4codataapi' is not assigned to you."

Environment

SAP Cloud for Customer

Reproducing the Issue

1. Open the system.
2. Go to Administrator.
3. Open the OData service Explorer WoC view.
4. Select "c4codataapi" then TEST.
5. Under OData Console go to Test tab.
6. Past the URL https://myxxxxxx.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/TasksCollection.
7. Execute it using POST.
8. Error 401 Authorization.

Cause

This is happening because the Activity service was not selected in the Communication Arrangement.

Resolution

You need to select Activity service in the communication arrangement in order to have access to Task Collection.

Keywords

Task, Collection, Authorization, 401, Error, OData, Unauthorized, Assigned , KBA , LOD-CRM-INT-API , OData API (C4C Only) , How To

Product

SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications 2211