microsoft-teamswebhooks

Tagging with MS Teams' Incoming Webhook app


I have a php application that sends a post request to an 'Incoming Webhook' in ms teams. Part of the data sent is below:

                        'msteams' => [
                            'entities' => [
                                [
                                    'type' => 'mention',
                                    'text' => '<at>User</at>',
                                    'mentioned' => [
                                        'id' => 'user@domain.com',
                                        'name' => 'User',
                                    ]
                                ]
                            ],
                        ],

This correctly mentions the user, but how can I do this for a team or a channel?


Solution

  • Currently only user mention is supported in Incoming webhook. In general, mentioning a channel via payload is not supported yet in both Incoming Webhook and Bot.

    enter image description here

    Ref Doc: https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-format?tabs=adaptive-md%2Cdesktop%2Cconnector-html#mention-support-within-adaptive-cards