Forum Discussion
Webhook messages aren't delivered from azure functions
{
"type": "message",
"summary": "test",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"themeColor": "0072C6",
"summary": "test",
"content": {
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"size": "Large",
"weight": "Bolder",
"text": "test",
"wrap": true
},
{
"type": "TextBlock",
"size": "Large",
"weight": "Bolder",
"text": "messageTitle",
"wrap": true
},
{
"type": "TextBlock",
"size": "Medium",
"text": "asd",
"wrap": true
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"padding": "None",
"msteams": {
"width": "Full",
"entities": [
{
"type": "mention",
"text": "<at>MAK</at>",
"mentioned": {
"id": "email address removed for privacy reasons",
"name": "name"
}
}
]
}
}
}
]
}- Meghana-MSFTOct 16, 2023Former Employee
abdul_kareem_mohamme - We checked this at our end, we made a change to the card to make sure it follows this pattern. It is working fine. - https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-format?tabs=adaptive-md%2Cdesktop%2Cconnector-html#user-mention-in-incoming-webhook-with-adaptive-cards
We need to add "<at>Admin</at>"(Same as text property in entities) in text block of body so that it will show the @mention properly. We also replaced the text in entities block. Below is the final JSON.
{ "type": "message", "summary": "test", "attachments": [ { "contentType": "application/vnd.microsoft.card.adaptive", "contentUrl": null, "themeColor": "0072C6", "summary": "test", "content": { "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "size": "Large", "weight": "Bolder", "text": "test", "wrap": true }, { "type": "TextBlock", "size": "Large", "weight": "Bolder", "text": "messageTitle", "wrap": true }, { "type": "TextBlock", "size": "Medium", "text": "Hi <at>Admin</at>", "wrap": true } ], "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.0", "padding": "None", "msteams": { "width": "Full", "entities": [ { "type": "mention", "text": "<at>Admin</at>", "mentioned": { "id": "admin@M365x17798679.onmicrosoft.com", "name": "Admin" } } ] } } } ] }If you are still facing the issue even after making these changes, could you please share demo credentials where this issue is reproducible. Please share the credentials at microsoftteamsdev@microsoft.com.
- abdul_kareem_mohammeOct 16, 2023Copper ContributorWhat exactly has changed here? It looks the same to me.
- Meghana-MSFTOct 16, 2023Former EmployeeLine number 30, 42, 44, 45.