How do I fix the the Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400.
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": {
"$schema": ".json",
"type": "AdaptiveCard",
"version": "1.0",
"msTeams": {
"width": "full"
},
"body": [
{
"type": "Container",
"id": "cd32d5aa-9f98-d6e7-c547-60420f3561d8",
"padding": "Default",
"items": [
{
"type": "TextBlock",
"id": "9082cad7-6b04-312f-0816-b7d2f06d030e",
"text": "Carton Creation Failed",
"wrap": true,
"weight": "Bolder",
"size": "Medium",
"spacing": "Medium"
},
{
"type": "Container",
"id": "e803d156-374b-8243-1d5c-dc1f36c00e72",
"padding": "Small",
"items": [
{
"type": "FactSet",
"id": "6354a598-0946-040f-7dbf-8e4f07cead37",
"facts": [
{
"title": "URL",
"value": "/api/pos/multiple"
},
{
"title": "Method",
"value": "POST"
},
{
"title": "Payload",
"value": "[{....}]" // This array data is more than 300
}
],
"spacing": "None"
}
],
"style": "emphasis"
},
{
"type": "TextBlock",
"id": "9c0b7f9b-2af0-6a47-293f-b8bd1179ecea",
"text": "Jul 17, 2021 05:55 PM",
"wrap": true,
"horizontalAlignment": "Right",
"isSubtle": true,
"spacing": "Small",
"size": "Small"
}
]
}
],
"padding": "None"
}
}
]
}
The value is an array which is more than 300 and it causing error Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400
.
How do I fix on it? but when I try to less the array data to maximum 13 the error doesn't display and it will generate on the teams. but when its more than 14 it causing an error.
here's the data value:
[
{
noFrom: 1,
noTo: 119,
qty: 12,
color: "RED EYE",
customer: "Jake",
date: "2021-08-07",
excess: false,
id: "7vajD0TZ7nFK7nMJ1QKgrB0j_A1UGf2paA",
orNo: "7019124",
mixed: false,
orderQty: 1428,
orderType: "PCS",
packaging: {id: "Z4-NKR3wk7d5ZyCjRfuMJKrR1rxNRuofTg"},
no: "X5125-1",
idNo: "X5125-1-001",
size: "M",
sizes: [{ code: xs, id: 1}],
pack: "CGX-0861-BLUE-XS",
totalQty: 12,
vendor: "eddie",
weight: {id: "uLqsKkyOv7VruJdodZe0nYgSU-B55q0nGA", value: 32},
},{
noFrom: 1,
noTo: 119,
qty: 12,
color: "BLUE EYE",
customer: "Jessie",
date: "2021-08-07",
excess: false,
id: "7vajD0TZ7nFK7nMJ1QXxkajs_A1UGf2paA",
orNo: "7019124",
mixed: false,
orderQty: 1428,
orderType: "PCS",
packaging: {id: "Z4-NKR3wk7d5ZyCjRfuMJKrR1rxNRuofTg"},
no: "X5125-1",
idNo: "X5125-1-001",
season: "2021-09",
size: "M",
sizes: [{ code: m, id: 3}],
pack: "CGX-0861-BLUE-M",
totalQty: 12,
vendor: "James",
weight: {id: "uLqsKkyOv7VruJdodZe0nYgSU-B55q0nGA", value: 32},
},
....
]
it success but here's the response Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400.
How do I fix the the Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400.
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"msTeams": {
"width": "full"
},
"body": [
{
"type": "Container",
"id": "cd32d5aa-9f98-d6e7-c547-60420f3561d8",
"padding": "Default",
"items": [
{
"type": "TextBlock",
"id": "9082cad7-6b04-312f-0816-b7d2f06d030e",
"text": "Carton Creation Failed",
"wrap": true,
"weight": "Bolder",
"size": "Medium",
"spacing": "Medium"
},
{
"type": "Container",
"id": "e803d156-374b-8243-1d5c-dc1f36c00e72",
"padding": "Small",
"items": [
{
"type": "FactSet",
"id": "6354a598-0946-040f-7dbf-8e4f07cead37",
"facts": [
{
"title": "URL",
"value": "/api/pos/multiple"
},
{
"title": "Method",
"value": "POST"
},
{
"title": "Payload",
"value": "[{....}]" // This array data is more than 300
}
],
"spacing": "None"
}
],
"style": "emphasis"
},
{
"type": "TextBlock",
"id": "9c0b7f9b-2af0-6a47-293f-b8bd1179ecea",
"text": "Jul 17, 2021 05:55 PM",
"wrap": true,
"horizontalAlignment": "Right",
"isSubtle": true,
"spacing": "Small",
"size": "Small"
}
]
}
],
"padding": "None"
}
}
]
}
The value is an array which is more than 300 and it causing error Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400
.
How do I fix on it? but when I try to less the array data to maximum 13 the error doesn't display and it will generate on the teams. but when its more than 14 it causing an error.
here's the data value:
[
{
noFrom: 1,
noTo: 119,
qty: 12,
color: "RED EYE",
customer: "Jake",
date: "2021-08-07",
excess: false,
id: "7vajD0TZ7nFK7nMJ1QKgrB0j_A1UGf2paA",
orNo: "7019124",
mixed: false,
orderQty: 1428,
orderType: "PCS",
packaging: {id: "Z4-NKR3wk7d5ZyCjRfuMJKrR1rxNRuofTg"},
no: "X5125-1",
idNo: "X5125-1-001",
size: "M",
sizes: [{ code: xs, id: 1}],
pack: "CGX-0861-BLUE-XS",
totalQty: 12,
vendor: "eddie",
weight: {id: "uLqsKkyOv7VruJdodZe0nYgSU-B55q0nGA", value: 32},
},{
noFrom: 1,
noTo: 119,
qty: 12,
color: "BLUE EYE",
customer: "Jessie",
date: "2021-08-07",
excess: false,
id: "7vajD0TZ7nFK7nMJ1QXxkajs_A1UGf2paA",
orNo: "7019124",
mixed: false,
orderQty: 1428,
orderType: "PCS",
packaging: {id: "Z4-NKR3wk7d5ZyCjRfuMJKrR1rxNRuofTg"},
no: "X5125-1",
idNo: "X5125-1-001",
season: "2021-09",
size: "M",
sizes: [{ code: m, id: 3}],
pack: "CGX-0861-BLUE-M",
totalQty: 12,
vendor: "James",
weight: {id: "uLqsKkyOv7VruJdodZe0nYgSU-B55q0nGA", value: 32},
},
....
]
it success but here's the response Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400.
{\"noFrom\": 1,\"noTo\": 119,\"qty\": 12,\"color\": \"RED EYE\",\"customer\": \"Jake\",\"date\": \"2021-08-07\",\"excess\":false,\"id\": \"7vajD0TZ7nFK7nMJ1QKgrB0j_A1UGf2paA\",\"orNo\": \"7019124\",\"mixed\": false,\"orderQty\": 1428,\"orderType\": \"PCS\",\"packaging\": {\"id\": \"Z4-NKR3wk7d5ZyCjRfuMJKrR1rxNRuofTg\"},\"no\": \"X5125-1\",\"idNo\": \"X5125-1-001\",\"size\": \"M\...}
We added more that 13 data in this format and we didn't get any error. Could you please try doing this way?
– Hunaid Hanfee-MSFT
Commented
Jul 22, 2021 at 10:45
jq -r tostring my.json > my.minified.json
& trying with the new minified payload... but still , it's not clear how to troubleshoot the 400 error as there is no verbose log for it.
– Abdennour TOUMI
Commented
Oct 23, 2022 at 5:32
I just started getting this error. It was working fine until yesterday.
By trial and error eventually I found out that if I removed all occurrences of "weight": "normal",
from my multiple TextBlock
the problem was solved.
Like user "Abdennour TOUMI" said, there's no error message and you need to debug it yourself. It happens that all my TextBlock
had "normal"
under "weight"
, so the appearance of the AdaptiveCard remained unchanged.
It would be good if the product gave out useful error messages instead of just Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400 with ContextId 01=2..
Now I'm worried it will break out of nothing and for no reason again.
To resolve the "Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400" issue, reconfigure the Microsoft Teams channel's ining webhook. Generate a new webhook URL by re-adding or editing the webhook configuration in Teams. Use this updated URL in your Zabbix alert configuration to ensure seamless munication between Zabbix and Teams.
This approach ensures the webhook URL is valid and properly linked to your Teams channel, resolving the error effectively.