on 07-20-2021 1:36 PM
Dear Community,
For an integration project I need to connect SAP C4C with a preconfigured SAP Connector of an iPaaS.
The connector only needs the OData service URL, username and password to establish a connection.
Via Postman I can successfully address all endpoints like "/sap/c4c/odata/v1/c4codataapi/LeadCollection".
When I enter "/sap/c4c/odata/v1/c4codataapi/" as the OData Service URL, I get an error with both Postman and the Connector.
The error message at Postman is: "Unauthorized: The service 'c4codataapi' is not assigned to you."
In this case, is the service URL to be entered a different one or am I just missing an authorization here?
If it is an authorization problem, how do I enable the authorization specifically for "/sap/c4c/odata/v1/c4codataapi/"?
Hi Mikail,
First of all which user are you using to trigger endpoints https://myxxxxxx.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi? Is it a Technical User that is generated via communication arrangement or is it a business user?
If it is a technical user then you are not allowed to use endpoint "/sap/c4c/odata/v1/c4codataapi" because you cannot assign the authorisation for this via communication arrangement. Here then you need to use specific endpoints like follow(can be copied from communication arrangement)
https://my3XXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/$metadata
https://my3XXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/$metadata?$filter=Visit
https://my3XXXXX.crm.ondemand.com/sap/c4c/odata/v1/activity/$metadata
Further why you need to access /sap/c4c/odata/v1/c4codataapi endpoint?
BR
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mikail,
Technical users are used for Integration Purposes. These users are created internally by the system when you create a communication scenario between C4C and external system.
Business users can be used for testing purposes. Example: You can use Business users in tools like Google Chrome or Postman to test the Odata Calls.
I have executed the URL given by you in Google Chrome with my user and it was working for me.
So, this should be an issue either with the user or the tool you are using to make this call.
But, this url just gives you the list of entity collection under the c4codataapi.
Response for this URL :
Regards,
Palani.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mikail,
Kindly check whether the Business user which you are using is having unrestricted access to the Odata Service Explorer.
Also, the URL should be https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/
Where XXXXXX is the tenant ID.
Regards,
Palani.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Palani,
thank you very much for the answer.
As I know the user that I use for the API connection has no limitations.
I get a successful response for all endpoints like ".../sap/c4c/odata/v1/c4codataapi/LeadCollection" or ".../sap/c4c/odata/v1/c4codataapi/OpportunityCollection".
But as already communicated in my first question, specifically for the address "https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/" I get the following response:
--> "Unauthorized: The service 'c4codataapi' is not assigned to you."
Where exactly is the setting to be made explicitly for ".../sap/c4c/odata/v1/c4codataapi/"?
And is it necessary to use a technical user instead of a business user?
Kind regards,
Mikail
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.