Forum Discussion
Webhook Messages are not delivering New Relic Notifications
We integrated New Relic Notifications to Teams Via Webhook and the notifications started failing randomly with error "Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400 with ContextId 01=2"
The notifications are failing randomly whenever a new alert is in activated state . No notifications are failing when the state is changed to closed.
JSON Payload :
{
"type":"message",
"attachments":[
{
"contentType":"application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content":{
"$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
"type":"AdaptiveCard",
"$data":{
"age" : "17"
},
"version":"1.6",
"body":[
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"size": "Large",
"weight": "Bolder",
"wrap" : true,
"text": {{ json priority }},
"color": "Attention"
},
{
"type": "TextBlock",
"weight": "Bolder",
"text": {{ json annotations.title.[0] }},
"wrap": true
},
{
"type": "FactSet",
"facts": [
{
"title": "Alert State",
"value": {{ json state }}
}
]
},
{
"type": "Image",
"url": {{json violationChartUrl}},
"altText" : "Image missing",
"style" : "default"
},
{
"type": "FactSet",
"facts": [
{
"title": "Incidents",
"value": {{json totalIncidents}}
},
{
"title": "Impacted Entity",
"value": {{json entitiesData.names.[0] }}
},
{
"title": "Condition",
"value": {{ json accumulations.conditionName.[0] }}
},
{
"title": "Policy",
"value": {{ json accumulations.policyName.[0] }}
}
]
}
]
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "Open Alert",
"url": {{ json issuePageUrl }}
}
]
}
}
]
}
- Prasad_Das-MSFTMicrosoft
saisanthosh934 - We tried to repro this issue by sending the same card via incoming webhook using Postman and we are able to send card successfully.
- saisanthosh934Copper Contributor
It is not happening continuously and happening randomly . Below is the screenshot from new relic regarding the notification failure
- Prasad_Das-MSFTMicrosoft
saisanthosh934 - Could you please share the tenant details and network log along with the time stamp when the request if failing, so that we can investigate further?