Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Custom Connector : x-www-form-urlencoded body : invalid JSON



I would be very grateful of anyone's help.  I need to create a custom connector which will call a REST API from an on premise application across our data gateway.


I have a GET request working nicely so the gateway connection is working correctly but I am running into problems when using a POST request because of the required format of the BODY payload.  I have the call working correctly in POSTMAN but importing the definition or creating manually in the custom connector is not working.


I have created a policy which updates the http header to the required x-www-form-urlencoded content-type but this doesn't change the validation on the body content entry.


My question is,  in postman you can create a nice key (input_data) value ( {myJSONStructure}) pair which generates the body structure 'input_data={myJSONStructure}' which is what this API expects.


In the custom connector it wont accept input_data={myJSONStructure} as it its not valid JSON, how can I enter the required JSON structure into the custom connector so the body payload is generated input_data={myJSONStructure}


any help gratefully received.




Very hard to debug w/o actual details.

First of all, it isn't clear how the JSON payload is encoded in the form data payload. It is really uncommon - and OpenAPI 2.0 doesn't support it.


We dont have UI support for formdata. But, if you are able to author the swagger spec yourself, it should work.

Your operation should look like below:

 '/path': {

    operationId: PostCalll,

    consumes: [ "application/x-www-form-urlencoded" ],

    parameters: [


         name: input_data,

         in: formData,







Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Kudoed Authors
Users online (2,142)