Forum Discussion

suriya690's avatar
suriya690
Copper Contributor
Jul 07, 2022

Get User email in Mention Action Card in Incoming Webhook in Teams Channel

  • suriya690 - You can refer below json to implement @mention using incoming webhook.

    {
        "type": "message",
        "attachments": [
            {
            "contentType": "application/vnd.microsoft.card.adaptive",
            "content": {
                "type": "AdaptiveCard",
                "body": [
                    {
                        "type": "TextBlock",
                        "size": "Medium",
                        "weight": "Bolder",
                        "text": "Sample Adaptive Card with User Mention"
                    },
                    {
                        "type": "TextBlock",
                        "text": "Hi <at>Adele UPN</at>, <at>Adele Azure AD</at>"
                    }
                ],
                "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
                "version": "1.0",
                "msteams": {
                    "entities": [
                        {
                            "type": "mention",
                            "text": "<at>Adele UPN</at>",
                            "mentioned": {
                              "id": "AdeleV@contoso.onmicrosoft.com",
                              "name": "Adele Vance"
                            }
                          },
                          {
                            "type": "mention",
                            "text": "<at>Adele Azure AD</at>",
                            "mentioned": {
                              "id": "87d349ed-44d7-43e1-9a83-5f2406dee5bd",
                              "name": "Adele Vance"
                            }
                          }
                    ]
                }
            }
        }]
    }

     

    Thanks, 

    Prasad Das

    --------------------------------------------------

    If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.



  • suriya690 - You can refer below json to implement @mention using incoming webhook.

    {
        "type": "message",
        "attachments": [
            {
            "contentType": "application/vnd.microsoft.card.adaptive",
            "content": {
                "type": "AdaptiveCard",
                "body": [
                    {
                        "type": "TextBlock",
                        "size": "Medium",
                        "weight": "Bolder",
                        "text": "Sample Adaptive Card with User Mention"
                    },
                    {
                        "type": "TextBlock",
                        "text": "Hi <at>Adele UPN</at>, <at>Adele Azure AD</at>"
                    }
                ],
                "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
                "version": "1.0",
                "msteams": {
                    "entities": [
                        {
                            "type": "mention",
                            "text": "<at>Adele UPN</at>",
                            "mentioned": {
                              "id": "AdeleV@contoso.onmicrosoft.com",
                              "name": "Adele Vance"
                            }
                          },
                          {
                            "type": "mention",
                            "text": "<at>Adele Azure AD</at>",
                            "mentioned": {
                              "id": "87d349ed-44d7-43e1-9a83-5f2406dee5bd",
                              "name": "Adele Vance"
                            }
                          }
                    ]
                }
            }
        }]
    }

     

    Thanks, 

    Prasad Das

    --------------------------------------------------

    If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.



      • Prasad_Das-MSFT's avatar
        Prasad_Das-MSFT
        Icon for Microsoft rankMicrosoft

        suriya690 -We got confirmation from engineering team that " Currently message (legacy) cards don’t support user at mentions".
        To achieve your requirements, we recommend you give your feedback here.

Resources