#Weird issue using Webhooks and MS Teams

1 messages · Page 1 of 1 (latest)

quartz pond
#

Hello there,
I am having a weird issue. I am testing the possibility to use MS Teams as a notification platform for tickets people have submitted in GLPI, the ticketing system we have here at my job. It has a plugin that lets you send webhook messages out, and edit the json formatting to customize the message.

I have used this test message:

{
    "type": "message",
    "attachments": [{
        "contentType": "application/vnd.microsoft.card.adaptive",
        "content": {
            "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
            "type": "AdaptiveCard",
            "version": "1.2",
            "body": [
                {
                    "type": "TextBlock",
                    "size": "Medium",
                    "weight": "Bolder",
                    "text": "Sample Adaptive Card with User Mention"
                },
                {
                    "type": "TextBlock",
                    "text": "Hi <at>User</at>!"
                }
            ],
            "msteams": {
                "entities": [
                    {
                        "type": "mention",
                        "text": "<at>User</at>",
                        "mentioned": {
                            "id": "User@domain.com",
                            "name": "User"
                        }
                    }
                ]
            }
        }
    }]
}

When I send the above JSON through CURL on a CMD prompt, it works. Mentions the user and everything.
But when I put that JSON into the webhook plugin for GLPI, it doesn't show up. Weirdly, it doesn't seem to error either, so I don't know what is happening there.

However, if I change the type from "Mention" to "TextBlock" (I don't even change anything else, just that one field), it shows up again.
Any suggestions?