Forum Discussion

LarsKnoll's avatar
LarsKnoll
Copper Contributor
Jan 05, 2024

Mentions are broken in adaptive cards when responding to Universal Actions

I have a problem using mentions in responses to universal actions. Say my bot sends a message with an adaptive card to a Teams Channel:

 

 

{
  "type": "message",
  "attachmentLayout": "list",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "contentUrl": "",
      "content": {
        "type": "AdaptiveCard",
        "version": "1.6",
        "body": [
          {
            "type": "TextBlock",
            "text": "<at>Lars Knoll</at> created the incident"
          },
          {
            "type": "ActionSet",
            "actions": [
              {
                "type": "Action.Execute",
                "title": "Submit",
                "verb": "submit"
              }
            ]
          }
        ],
        "msteams": {
          "entities": [
            {
              "type": "mention",
              "text": "<at>Lars Knoll</at>",
              "mentioned": {
                "id": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
                "name": "Lars Knoll"
              }
            }
          ]
        }
      }
    }
  ]
}

 

 

This works just fine and I get can see a proper mention in the adaptive card. When I press the Submit button, I simply resend the same adaptive card as an answer to the bot:

 

{
    "type": "application/vnd.microsoft.card.adaptive",
    "value": { ... same card as above ... }
    "statusCode": 200
}

 

 

I would expect that the mention continues to work, but instead I see “<at>Lars Knoll</at>” in teams (both Classic and the new Teams). In the web client things look slightly better (I don’t see the <at> tag and the name is highlighted), but the mention is still broken.

 

Is there a way to get this working or an ETA for a fix?

7 Replies

  • H5a's avatar
    H5a
    Copper Contributor

    Hi everyone, I'm currently facing the same issue reported by LarsKnoll​. My mentions are lost when I reply the `Action.Execute`. Is it a known issue? Thanks in advance!

  • We are not able to repro this issue. Could you please share the repro video to raise a bug?

    • vikram-MFST's avatar
      vikram-MFST
      Former Employee

      Hello @ LarsKnoll

      Could you please let us know whether your issue has got resolved? If not, we are not able to repro this issue. Could you please share the repro video to raise a bug?

    • LarsKnoll's avatar
      LarsKnoll
      Copper Contributor

      As I said above, I can see the problem both in the classic and the new teams client (tested on macOS).

       

      It’s also not working correctly in the web client where it creates a mention, but when I hover over it I get an empty popup.

      • ChetanSharma-msft's avatar
        ChetanSharma-msft
        Icon for Microsoft rankMicrosoft

        Thanks for sharing the information. 
        We will look into it and let you know the updates.