Adf error 2108 - Accessing web activity post call

N2120 81 Reputation points
2025-02-06T05:16:22.2333333+00:00

Hello,

I am in the process of designing a pipeline of writing back to api using endpoint of SAP.

I was able to do a post call and get the needed resultset from postman.

While the same end point is giving unauthorised error in adf.

I am not sure if this is a network error

I am generating a token which I am passing as a header value in post call.

BODY has the {}

Do I have to select something in authentication

User's image

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,206 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chandra Boorla 7,810 Reputation points Microsoft Vendor
    2025-02-06T10:20:19.8333333+00:00

    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: User's image 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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.