Search code examples
jsonazurepostmanazure-data-factory

API working fine in Postman but not in Web Activity of ADF


The POST request is working fine in Postman but is generating an error in the web activity of ADF. No parameters are being passed, and the Authorization setting is "Inherit auth from parent." Please find the more details of Postman in screenshots below.

  1. URL and Header: Postman URL and Header
  2. Postman JSON Body: Postman JSON Body
  3. Postman JSON Output: Postman JSON Output

Following the same approach in the web activity of ADF, but every time I get the below error:

enter image description here I am trying the following approach too for the Web activity:

  1. Changed the Integration Runtime from AutoresolveIntegrationRuntime to SelfHostedIntegrationRuntime, but no luck.
  2. Added "Bearer" and a space before the value of the app-token, but no luck.
  3. Added Authorization as Header too and given the value as Bearer and a space with value of token.
  4. Checked the JSON body with an online checker too. enter image description here

Please, someone guide me on this. What am I missing here? The error itself says "user configuration issue." I have tried everything and experimented in various ways but am still stuck.


Solution

  • For Content-Type as application/x-www-form-urlencoded

    you need to give the body in below format.

    name=test&salary=123&age=23

    I can see you giving query value a json body and postman got the response. So, you body should be like this

    query={"name":"jai","salary":"123","age":"23"}

    or

    key value pair joined with equal sign(=) and each pair separated by ampersand(&).

    Input:

    enter image description here

    Output:

    enter image description here