Web Activity in Fabric Fails for application/x-www-form-urlencoded Token Request

Devendra Adhikari 0 Reputation points
2025-06-25T19:11:18.0866667+00:00

Hi all,

I'm trying to use a Web Activity in Microsoft Fabric Data Pipeline to retrieve a login token from an API. The API expects a POST request with:

  • Content-Type: application/x-www-form-urlencoded

Body: A simple key-value string in the format:

{
"appId": "",
"clientSecret": "" 
}

However, when I configure the Web Activity as follows:

Method: POST

Header: Content-Type: application/x-www-form-urlencoded

  • Body:
       appId={}&clientSecret={}
    

I get the following error:

Invalid request parameter(s): Invalid JSON body was provided. Error detail: Expecting value: line 1 column 1 (char 0)

image

It seems the Web Activity may be interpreting the body as JSON, even though I'm sending raw x-www-form-urlencoded data, which is working perfectly in Postman.


🧪 What I’ve Tried:

Confirmed the same body and headers work in Postman.

Ensured there are no line breaks or extra characters in the body.

  • Attempted switching to JSON (results in Base64 error, as expected).

🙋‍♂️ Question:

Is there a supported way in Fabric Web Activity to send a raw application/x-www-form-urlencoded body without it being treated as JSON? Or, is there an alternate activity (like Dataflow or Script) that can more reliably handle this kind of POST request?

P.S. I followed this thread but does not seem to work in my case.
https://stackoverflow.com/questions/54256158/the-format-of-body-for-a-post-request-in-web-activity-in-azure-data-factory

Thanks in advance!

Community Center | Not monitored
0 comments No comments
{count} votes

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.