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?

(0) ShareShare
ReportReport
Posted on 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 at
    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 at
    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard