cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ErickDiaz
Resolver I
Resolver I

How to Specify a Raw Body on a Flow Custom Connector instead of JSON?

Hi,

 

I’m creating a Flow process that uses a custom connector to access an on-prem API using the data gateway. I’m on the first step process to get the access token, the POST method expects a raw body as follow:

 

grant_type=password&username=myusername123&password=mypassword123&scope=api

 

Unfortunately, the custom connector only allows me to define the body in a JSON format so my connector is failing because of the body:

 

{
"grant_type" : "password",
"username" : "myusername123",
"password" : "mypassword123",
"scope" : "api"
}

 

When testing the custom connector, there is an option that let’s me specify a raw body and the test is successful.

 

Custom Connector - JSON Body Failed 400:

ErickDiaz_0-1618580497226.jpeg

 

 

Custom Connector - Raw Body Succeeded 200:

ErickDiaz_1-1618580497236.jpeg

 

 

However, when I create my flow, I do not have the option to pass the body as raw:

 

ErickDiaz_2-1618580497250.jpeg

 

Any idea how to pass a raw body to my custom connector?

 

Thank you,

 

Erick

1 ACCEPTED SOLUTION

Accepted Solutions
ErickDiaz
Resolver I
Resolver I

I found a very simple fix, I just had to specify an empty string with double quotes (i.e. "") as the Body and that prevented Power Apps from converting my parameter (grant_type=password&username=myusername123&password=mypassword123&scope=api) to JSON.

View solution in original post

1 REPLY 1
ErickDiaz
Resolver I
Resolver I

I found a very simple fix, I just had to specify an empty string with double quotes (i.e. "") as the Body and that prevented Power Apps from converting my parameter (grant_type=password&username=myusername123&password=mypassword123&scope=api) to JSON.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors
Users online (3,157)