How can a bot receive all messages, regardless of whether the user is mentioned using @mention?

abbas izadipour 210 Reputation points
2024-03-19T17:57:05.2433333+00:00

I have created a Microsoft Teams bot that is installed in a team. Users in channels within the team can only interact with the bot using @mentions. However, I want to allow users to chat with the bot without using @mentions. Currently, I haven't made any changes in my code. The only change I made is to the app manifest, so that the Microsoft Teams platform is aware that the bot should not require @mentions. I added the following lines to my bot manifest:

"webApplicationInfo": {

"id": "${{BOT_ID}}",

"resource": "https://Any string/The resource field has no operation in RSC, but must be added with a value to avoid error response"

},

"authorization": {

"permissions": {

    "resourceSpecific": [

        {

            "type": "Application",

            "name": "ChannelSettings.Read.Group"

        },

        {

            "type": "Application",

            "name": "ChannelMessage.Read.Group"

        }

    ]

}

}

I believe that with this change, the bot should send messages in the channels without users needing to use @mentions. However, after installing the bot with the new manifest, Microsoft Teams is still sending messages as if the user is using @mentions to post the message. What should I do to have Microsoft Teams send all messages regardless of the user using @mentions?

Microsoft Teams | Development
{count} votes

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.