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 / HTTP Action calls Grap...
Power Automate
Unanswered

HTTP Action calls Graph API Post Method with Body Payload - Error 411

(0) ShareShare
ReportReport
Posted on by 6
Hi,
 
We are creating a power automate flow to manage dinamically content of Entra ID groups. Usage of Entra ID connectors is not considered for security reasons. Instead of we use HTTP request with a bearer token obtained on the flow in a previous action.
 
We have no problems callng GET Graph API methods using the HTTP Request action, but when a POST method is called using a body json payload an annyoing 411 error message does appear.
 
E.g
 
 
 
 
 
Power Automate - HTTP Request  - Raw Input (tested properly in POSTMAN successfully)
 
{
    "uri""https://graph.microsoft.com/v1.0/groups/69fe1ae3-cd9f-4541-8b6a-69cfd562e1a8/members/$ref",
    "method""POST",
    "headers": {
        "Content-Type""application/json",
        "Authorization""*sanitized*"
    },
    "body": {
        "@odata.id""https://graph.microsoft.com/v1.0/directoryObjects/1f0109d2-d843-40b8-bf67-8ec04f2785e7"
    }
}
 
 
 
Power Automate - HTTP Request - Output
 
 
<!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>
 
 
 
 
A quick google search suggest trying to disable the HTTP action feature named "Allow chunking" but issues seems to appear anyway
 
 
Any idea about how to handle this error?

Many Thx
I have the same question (0)
  • Expiscornovus Profile Picture
    33,851 Most Valuable Professional on at
     
    How have you setup the HTTP action? Would be useful to see the Headers setup. I assume you used the Bearer {accesstoken} as the value for the Authorization key?
     
    Below is an example to demonstrate. (btw, I have escaped the at-sign because otherwise it won't save in the old designer).
     
    body('HTTP_-_Get_access_token')['access_token']
     
     


    Flow run




     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel
  • AG-21021538-0 Profile Picture
    6 on at
    Hi,
     
    The problem was on the token. For some unknown reason it included some strange characters (return line \r\n) at the end.

    These characters did not cause any problem on HTTP authentication when calling GET methods, but curiously they raised the problem when calling POST endpoints due its impact on the calculation of the famous Content-Length (not required on GET but required on POST).
     
    We solved the problem removing these characters on the token.

    Still a mistery why these characters prevented the proper calculation of the content-length....

    Hope it helps someone else

    Alfons
  • Expiscornovus Profile Picture
    33,851 Most Valuable Professional on at
     
    Thanks for sharing the root cause, that is useful to know.

     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard