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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unable to call Invoke ...
Power Automate
Answered

Unable to call Invoke Web Service in Power Automate Desktop to get the Bearer token

(0) ShareShare
ReportReport
Posted on by 6

Hello Team,

 

I want to get Bearer token with the help of authorization code and other parameters, so I am using Invoke Web Service call but it's throwing an error like below,

I have passed  custom header parameters as a List because it has more than one,

below is the header parameter list,

 

grant_type:authorization_code

client_id:**8b**-***-4857-baed-***742***

redirect_uri=http://localhost/myapp/

scope=https://Ourdomain.onmicrosoft.com/ClientID/user_impersonation

code=%AUTHCODE%

 

Below is the Error :

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>

 

PADFlow.pngWebServiceCall.pngWorking in Cloud Flow_Http Action.png

 

Same call is working with Power automate cloud with HTTP action and it's returning bearer token also,

 

Please see attached below screen shot for same.

 

Please help me to sort out the issue , struggling from weeks.

 

Regards,

Nitin 

 

I have the same question (0)
  • Verified answer
    ZS440 Profile Picture
    262 on at

    HI @NitinJagtap 

    Try writing parameters in Body.

    Open Advanced and turn off the Encode request body option.
    Note that it is on by default.

    CleanShot 2022-09-28 at 00.29.44@2x.png

     

  • NitinJagtap Profile Picture
    6 on at

    @ZS440 ,

    Thanks for your quick suggestion and help . I have passed parameters in Body and  changed the Accept and Content_types as you mentioned and it works smoothly.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 248 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 160 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 142 Super User 2026 Season 2

Last 30 days Overall leaderboard