Hi @N2120
Greetings & Welcome to Microsoft Q&A forum! Thanks for posting your query!
It looks like you're encountering an unauthorized error (2108) when trying to call the SAP API from Azure Data Factory (ADF). This can happen for several reasons, here are some steps to troubleshoot and resolve the issue:
Authentication Mode - In ADF Web Activity, make sure the Authentication type is set to None if you're manually passing a token in the headers. In the Headers section, include your token.
Token Generation - Double-check the token you’re generating, ensure the token is valid and not expired at the time of the API call. Confirm that the token generation process in ADF matches the one in Postman (e.g., all required parameters, headers, and body fields are being sent).
Body and Headers - Verify that the Body and Headers in the Web Activity exactly match what you used in Postman. Ensure the Content-Type is explicitly set to application/json in the headers.
API URL and Parameters - Ensure the API URL in ADF matches the one tested in Postman, including query parameters and case sensitivity. Double-check for any extra spaces or formatting issues in the URL or headers.
Network Access - If the SAP API is hosted on a private network or behind a firewall, you’ll need to: Use a self-hosted Integration Runtime (IR) or Enable Managed Virtual Network (VNet) in ADF. If you're unsure, you can test connectivity from ADF to the API using tools like curl or nslookup.
Error Output - Check the Output of the Web Activity in ADF for the detailed error message. Sometimes, the error might hint at missing headers, incorrect tokens, or network-related issues.
Please refer to MS Q&A thread - ADF error accessing webservice with security token addressing similar issue as it might offer some insights.
For more details, please refer the Microsoft documentation: Troubleshoot Azure Data Factory and Synapse pipelines
I hope this information helps. Please do let us know if you have any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.