web activity in azure data factory - Rest API - Post method failing with error code \u0022

Anil Kumar Ulchala 0 Reputation points
2023-07-11T06:16:20.4633333+00:00

I'm getting \u0022 error while calling the REST API to generate a token via web activity(Post Method) in ADF. I'm using "content-type": "application/x-www-form-urlencoded".

User's image

ADF request:

User's image

This request was working fine 10 days ago with same configuraiton. Please let me understand how to modify the request.

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

1 answer

Sort by: Most helpful
  1. QuantumCache 20,266 Reputation points
    2023-07-12T22:07:36.75+00:00

    ok, thanks for the info!.

    To resolve this issue, you can try the following steps:

    Check the JSON payload to ensure that it is in valid JSON format. You can use an online JSON validator to check the payload.

    Ensure that all double quotes in the JSON payload are properly escaped. In JSON, double quotes must be escaped with a backslash (").

    If the JSON payload is in valid format and all double quotes are properly escaped, then the issue may be with the way the payload is being sent in the request body. You can try encoding the payload using the "application/x-www-form-urlencoded" content type.

    To encode the payload, you can use the "urlencode" function in ADF. For example, if your payload is stored in a variable called "payload", you can encode it using the following expression in the web activity:

    @urlencode(variables('payload'))

    Ensure that the "Content-Type" header in the web activity is set to "application/x-www-form-urlencoded".

    If you have already tried these steps and are still encountering issues, please provide more details about the JSON payload and the web activity configuration, and I can help you further.


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.