26 Oct 2023 09:12 AM - last edited on 23 Nov 2023 03:19 PM by Michal_Gebacki
Hello,
We are using the Microsoft Teams integration via webhook.
It took quite some time to elaborate a working JSON scheme tot visualize the necessary data
{
"@type":"MessageCard",
"@context":"http://schema.org/extensions",
"themeColor": "61a3f7",
"summary": "{Tags[Environment]} - {ProblemID} - {ProblemTitle}",
"sections": [{
"activityTitle":"{Tags[Environment]} - {ProblemID} - {ProblemTitle}",
"activitySubtitle":"{ImpactedEntity}",
"Facts":[
{ "name": "State", "value": "{State}" },
{ "name": "Severity", "value": "{ProblemImpact} - {ProblemSeverity}" },
{ "name": "Entities", "value": "{ImpactedEntityNames}" }
]
}],
"potentialAction": [{
"@type": "ActionCard", "name": "Show details",
"inputs": [{ "@type": "TextInput", "id": "details", "title": "Problem details",
"value": "{Tags} {ProblemDetailsText}", "isMultiline": true }]
},{
"@type": "ActionCard", "name": "Show tags",
"inputs": [{ "@type": "TextInput", "id": "details", "title": "Problem tags",
"value": "{Tags}", "isMultiline": true}]
},{
"@type": "OpenUri", "name": "Open in DT",
"targets": [{ "os": "default", "uri": "{ProblemURL}" }]
}
]
}
In MS Teams v1.6.00.20074, this visualizes like:
In MS Teams v1.6.00.27573, this visualizes as:
Are there other ways to send problem alerts to Microsoft Teams?
Thanks,
Jan
26 Oct 2023 10:16 AM
Hello,
This should work fine, you can test your message card using the below emulator
https://messagecardplayground.azurewebsites.net/
Thanks,
Islam
26 Oct 2023 11:03 AM
when copy-pasting the content above to the messagecardplayground, it seems to work fine.
However, the Teams application on my laptop still has trouble visualizing that content
26 Oct 2023 10:43 AM
Hi @Jan_VanBelle ,
Microsoft has introduced a new version and the classic version will be abandoned soon. Have you tried sending a webhook to Teams version or higher:
MAC: 23247.720.2421.8365
Windows: 23257.2620.2442.7817
PS:
Notifications from dozens of environments work unchanged for me.
26 Oct 2023 11:00 AM
Hello,
A colleague of mine already made that update to version 23257.***.*** and got the same error message as in the 2nd screenshot.
I got the same problem on my mobile, but I thought that 'd be related to missing libraries or something.
It would be nice if we could just use those adaptive cards.