Keep getting error codes (400 or 411) on send http request under microsoft groups in power automate

Glen Raudanskis 0 Reputation points
2025-08-11T15:50:13.28+00:00

I am trying to use power automate to create a flow that updates a group calendar when a new sharepoint list item is created. I've managed to make it so that when a new item is created, a new event is created in the calendar. I used the 'Create a group event (v2)' action to do this. The last step I want to do is make it so that the event in the calendar changes categories to make it a different colour. Unfortunately, the parameters in the 'Create a group event (v2)' action do not support this. So instead, I was trying to use the 'send http request v2' under office 365 groups to do this but I keep running into the error code '411 LengthRequiered' even though I have text in the body. I found a link that says I can do this but no matter what I try it doesn't work.

https://learn.microsoft.com/en-us/graph/api/event-update?view=graph-rest-1.0&tabs=http

I've tried adding in a custom header that specifies the content length but that didn't work either.

I also found this link which seems to maybe say that this is an issue that microsoft is working to resolve right now but I'm not sure if it means this directly. Also, this issue was from several weeks ago and it says it should've been fixed by eod from the day it was posted.

Here are the last two codes I was using (i removed my calendar id for privacy):

{ "type": "OpenApiConnection", "inputs": { "parameters": { "Uri": "https://graph.microsoft.com/v1.0/groups/(group id)/events/@{outputs('FilmingEvent')?['body/id']}", "Method": "PATCH", "CustomHeader1": "Content-Length: @{outputs('clfilming')}", "Body": "{"categories":["Red category"]}", "ContentType": "application/json" }, "host": { "apiId": "/providers/Microsoft.PowerApps/apis/shared_office365groups", "connection": "shared_office365groups", "operationId": "HttpRequestV2" } }, "runAfter": { "FilmingEvent": [ "Succeeded" ] }, "metadata": { "operationMetadataId": "0a13ae12-3700-478e-801f-c417cca31be2" } }

Can anyone help me understand if this is even something I can do? Is it broken right now? Is there a way for me to know when it will be fixed?

Microsoft 365 and Office | Other
{count} votes

3 answers

Sort by: Most helpful
  1. Michael Taylor 60,601 Reputation points
    2025-08-11T16:12:07.5333333+00:00

    It is unclear to me if you're explicitly calling the API directly or using one of the builtin approaches. In general content length is auto-calculated based upon the body. But if you're manually building up the request packe then this is on you.

    Your calculation looks wrong to me. It is using @{outputs('clfilming')}. I don't know what that is but an output seems after the fact. Also it would need to be an integral value. The content length is the length of the body so in your sample the value should just be "{"categories":["Red category"]}" length or 32 (?). Note that your JSON has double quotes and is itself wrapped in double quotes so I'm not sure if that is a display issue or your JSON may not be correct.

    I would try hard coding the length to the correct value for the body you're sending as a test. If that works then your content-length calculation is wrong. If it generates a 400 then your body is malformed and probably the double quotes. You likely need to use " instead of double quotes inside the body.


  2. Sumit D - IA 132.1K Reputation points Independent Advisor
    2025-08-11T16:29:16.89+00:00

    Hi,

    I'm Sumit, here to help with your query on the Microsoft Q&A forums.

    Apologies for any inconvenience you are experiencing. I am happy to help you today.

    The Microsoft Q&A platform does not currently provide support for Power Platform–related queries. For the best assistance, please post your question on the official Power Platform Community forum: https://community.powerplatform.com/

    This will connect you directly with experts and community members who specialize in Power Platform.\

    I hope you find this information useful. If you have any more questions, don't hesitate to reach out, otherwise, click Accept solution to close it. Wishing you good luck!

    0 comments No comments

  3. Sumit D - IA 132.1K Reputation points Independent Advisor
    2025-08-12T04:28:00.3933333+00:00

    Hi Glen, as I said you would surely get a better answer at the Power Automate community since the question more of relates to that.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.