Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error accessing the API from an external integration platform

henrique_andrade71
Discoverer
0 Likes
3,951

We are testing an external access to SAP Odata APIs and we are able to test it using Postman and also the Java classes that we downloaded from the SAP API Business Hub. The problem happens when I try to access the same APIs using Mulesoft. We are trying in all three solutions to access the Business Partner object.

My question is if there is any way to see error messages that are being generated in SAP when we try to use the API. I activated the Audit Logs, but looks like it does not have API level information.

The error that I get in Mulesoft when testing the connection is:

Error was: Not authorized: Forbiddencom.mulesoft.connector.sap.s4hana.internal.error.exception.NotAuthorizedException:

4 REPLIES 4
Read only

amontella96
Active Contributor
0 Likes
3,527

Hi henrique_andrade71

when you say that you have activated the Audit Logs, you mean followed this link

some ideas out there , you are 100% sure that credentials+URL are exactly the same btw postman and mulesoft, if yes check that certificates used between postman and api are the same btw mulesoft and api

did you activated any whitelisting in your target api?

good weekend!A

Read only

henrique_andrade71
Discoverer
0 Likes
3,527

Thanks for the reply. Maybe I am missing some configuration but I am using the same URL and Credentials.

Configuration in Mulesoft:

mulesoft-config.png

mulesoft-config2.png

Configuration Postman

config-postman.png

config-postman2.png

postman-query.png

Related to the logs, that was exactly the one that I enabled to see if I could find any message that could help me find the problem. Maybe Mulesoft is trying to query something else with no access.

Read only

henrique_andrade71
Discoverer
0 Likes
3,527

Found this in the log files for Mulesoft.

{"error":{"code":"/IWFND/CM_CONSUMER/101","message":{"lang":"en","value":"No authorization to access Service '/IWFND/SG_MED_CATALOG_0002'"},"innererror":{"application":{"component_id":"","service_namespace":"/IWFND/","service_id":"CATALOGSERVICE","service_version":"0002"},"transactionid":"17EF14C367B00190E00610855AB8EFFA","timestamp":"20210802235053.3585490","Error_Resolution":{"SAP_Transaction":"For backend administrators: use ADT feed reader \"SAP Gateway Error Log\" or run transaction /IWFND/ERROR_LOG on SAP Gateway hub system and search for entries with the timestamp above for more details","SAP_Note":"See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"},"errordetails":[]}}}

Looks like this is a quick fix but since I am new to SAP, can anyone help me on this?

Thanks,

Henrique

Read only

henrique_andrade71
Discoverer
0 Likes
3,527

SAP Gurus,

any hint or suggestions?