Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Process Mining
Answered

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

Like (0) ShareShare
ReportReport
Posted on 16 Apr 2021 13:42:35 by 156

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

Categories:
  • Jpan7185 Profile Picture
    2 on 14 Nov 2024 at 01:16:22
    How to Specify a Raw Body on a Flow Custom Connector instead of JSON?
    Hi Eric,
     
    This might be a late of a response. The easiest way is to set your raw body inside on a variable. Be sure that there are no spaces saparating any of the values:
    ​​​​​​​
     
    Then use the variable as the body of the http request
     
    and voila...
     
    Hope this helps
  • Verified answer
    ErickDiaz Profile Picture
    156 on 16 Apr 2021 at 17:31:19
    Re: How to Specify a Raw Body on a Flow Custom Connector instead of JSON?

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,786 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard