Mentions (<at> Tags) Doesn't Work in Nested Elements Like TableCell in Adaptive Cards

Selim SARIALTIN 20 Reputation points
2024-11-21T00:16:24.48+00:00

I am creating a table in my Adaptive Card and want to tag people inside the cells. However, this doesn't seem to be possible. If I use the mention in a top-level TextBlock, it works though. Could you please help me with this issue?

My Adaptive Card looks like this:

card = {
    "type": "message",
    "attachments": [
        {
            "contentType": "application/vnd.microsoft.card.adaptive",
            "content": {
                "type": "AdaptiveCard",
                "version": "1.4",
                "width": "stretch",
                "body": [
                    {
                        "type": "TextBlock",
                        "text": "This is my table",
                    },
                    {
                        "type": "Table",
                        "columns": [
                            {
                                "type": "TableColumn",
                                "width": "stretch"
                            },
                            {
                                "type": "TableColumn",
                                "width": "stretch"
                            }
                        ],
                        "rows": [
                            {
                                "type": "TableRow",
                                "cells": [
                                    {
                                        "type": "TableCell",
                                        "items": [
                                            {
                                                "type": "TextBlock",
                                                "text": "",
                                            }
                                        ]
                                    },
                                    {
                                        "type": "TableCell",
                                        "items": [
                                            {
                                                "type": "TextBlock",
                                                "text": "Col 2",
                                            }
                                        ]
                                    }
                                ]
                            },
                            {
                                "type": "TableRow",
                                "cells": [
                                    {
                                        "type": "TableCell",
                                        "items": [
                                            {
                                                "type": "TextBlock",
                                                "text": "Row 1",
                                            }
                                        ]
                                    },
                                    {
                                        "type": "TableCell",
                                        "items": [
                                            {
                                                "type": "TextBlock",
                                                "text": "<at>Miles GOLD</at>",
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    }
                ],
                "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
                "msteams": { 
                    "width": "full",
                    "entities": [
                        {
                            "type": "mention",
                            "text": "<at>Miles GOLD</at>",
                            "mentioned": {
                                "id": "miles.gold@gmail.com",
                                "name": "Miles GOLD"
                            }
                        }
                    ]
                }
            }
        }
    ]
}
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,482 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,416 questions
{count} votes

Accepted answer
  1. Sayali-MSFT 3,141 Reputation points Microsoft Vendor
    2024-11-21T12:33:20.6466667+00:00

    Hello @Selim SARIALTIN,
    Currently, Adaptive Cards do not support the mention feature within table cells.
    For information regarding Adaptive Card mentions, you can refer to this:
    https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-format?tabs=adaptive-md%2Cdesktop%2Cdesktop1%2Cdesktop2%2Cconnector-html#mention-support-within-adaptive-cards

    Thank you for your suggestion! To better achieve your requirements, we recommend submitting this feature request through the Teams Feedback Portal. This is the best way to ensure your idea is considered for future updates. 

    We appreciate your input and encourage you to share any additional thoughts! 


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.