Hi Microsoft Community,
I'm currently using Power Automate Workflow "Post to a channel when a webhook request is received" . I encountered an issue where large messages cause a "413 Entity Too Large" error. While I can see the error details on the Power Automate Workflow history page, I'm unable to retrieve this information directly from the HTTP response in my code.
Here’s a snippet of the code I’m using to send the request:
using (HttpClient client = new HttpClient(handler))
{
if (teamsChannelSettings.TeamsWebHook != null)
{
client.BaseAddress = new Uri(teamsChannelSettings.TeamsWebHook);
}
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, string.Empty)
{
Content = new StringContent(adaptiveCardJsonString, Encoding.UTF8, "application/json")
};
HttpResponseMessage response = client.SendAsync(request).Result;
return response;
}
Here is the response I get when the request is too large:
StatusCode: 202, ReasonPhrase: 'Accepted', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Pragma: no-cache
x-ms-workflow-run-id: 085848048607070941545...
x-ms-correlation-id: 447ddbe5-fc59-460a-84b6-219...
x-ms-client-tracking-id: 08584804860707094154508...
x-ms-trigger-history-name: 085848048607070941545...
x-ms-execution-location: westeurope
x-ms-workflow-system-id: /locations/westeurope/scaleunits/prod-14/workflows/25eb736c4dfe441983f6b..
x-ms-workflow-id: 25eb736c4dfe441983f6...
x-ms-workflow-version: 0858480574339817...
x-ms-workflow-name: 396dce14-048f-44ed-af42-83..
x-ms-tracking-id: 447ddbe5-fc59-460a-84b6-2191363..
x-ms-ratelimit-burst-remaining-workflow-writes: 68
x-ms-ratelimit-remaining-workflow-download-contentsize: 49556480
x-ms-ratelimit-remaining-workflow-upload-contentsize: 49492340
x-ms-ratelimit-time-remaining-directapirequests: 4615247
x-ms-request-id: westeurope:447ddbe5-fc59-460a-84b6..
Strict-Transport-Security: max-age=31536000; includeSubDomains
Cache-Control: no-cache
Date: Tue, 16 Jul 2024 09:06:54 GMT
Content-Length: 0
Expires: -1
}
We are receiving the same response for various failure cases, such as when the Adaptive Card JSON format is incorrect. Therefore, Please suggest how to determine the specific reason for the failure in response.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1