"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "TextBlock",
"text": "Hello <at>User Name</at>"
}
],
"msteams": {
"entities": [
{
"type": "mention",
"text": "<at>User Name</at>",
"mentioned": {
"id": "29:[User ID from Graph Explorer]",
"name": "User Name"
}
}
]
}
}
}
]
}
This does post the message and the user name highlights blue as if it is a mention but it isn't actually linking to the user. If you hover the name it doesn't show the popover with user info and it doesn't cause an entry to be added to your activity feed. It doesn't matter what id I put in the mention, the behavior is always the same.
I have seen multiple similar posts about this saying you have to use a "8:orgid:" or "9:", or "29:" with the ID but no combination I try seems to work. What am I missing here and why is this so complicated?
I have set up an Incoming Webhook for a channel in Teams and I am trying to send a message via curl to the webhook to display a message and tag a user. Here is my curl request:
curl.exe -H "Content-Type:application/json" -d [insert json here] https://company.webhook.office.com/webhookb2/[redacted]
And I am using the following json:
{