web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to Specify a Raw B...
Power Automate
Unanswered

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:
I have the same question (0)
  • Verified answer
    ErickDiaz Profile Picture
    156 on at

    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.

  • Jpan7185 Profile Picture
    2 on at
    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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard