Not able to mention bot in a message

Shubham Juneja 0 Reputation points
2024-07-31T13:41:39.2866667+00:00

I have created a Teams bot which will recieve and message and proceed accordingly
I want to use it anywhere in teams, by mentioning its name, for ex- @rewards add +2 point
But I have to manually add this bot to a particular conversation to make it work.

I downloaded a bot from marketplace named Bonusly and I was able to tag it anywhere without the need to add it in every thread.

Is the reason is that I haven't put the app on marketplace yet or is it related to manifest.json or something else?

Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Microsoft Teams | Development
Microsoft Teams | Microsoft Teams for business | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Sayali-MSFT 3,991 Reputation points Microsoft External Staff Moderator
    2024-08-01T11:00:51.32+00:00

    Hello @Shubham Juneja,
    The behavior you're observing is related to how your Teams bot is configured, especially in terms of its visibility and interaction capabilities. Here's steps you might need to consider:

    1. Bot Permissions and Configuration

    Bot's Permissions: The bot needs the right permissions to interact in channels or chat across Teams. Ensure that your bot has been granted the necessary permissions to post and respond in any channel or chat.

    Teams Manifest Configuration: The manifest.json file plays a crucial role in how your bot is deployed and how it can be used. Make sure your bot’s manifest is configured correctly:

    bots section: Ensure that your bot is correctly listed under the bots section in the manifest file. This section specifies the bot's capabilities and scopes.

    • scopes: For a bot to be used in any channel or chat, it needs to be configured with the appropriate scopes. Check that you have defined the bot with the team or personal scopes as required. For instance:
        "bots": [ { "botId": "%MICROSOFT-APP-ID-REGISTERED-WITH-BOT-FRAMEWORK%", "scopes": [ "team", "personal", "groupChat" ],
      
    1. Adding the Bot to Conversations

    Channel vs. Personal Chat: In Microsoft Teams, adding a bot to a specific channel or chat makes it available only in that context. If you want the bot to be accessible across various channels and chats without manually adding it each time, ensure it is configured as a global app with the appropriate scopes.

    Global Availability: The bot should be set up to be used in any channel or chat. For bots that need to be mentioned in any conversation or channel, you need to make sure that:

    • The bot has the correct permissions to access all relevant Teams and channels.
    • The bot is installed in the Teams tenant and available for all users.
    1. Publishing to the Marketplace

    Private vs. Public: If your bot is not yet published to the Teams App Store (marketplace), it might not be fully discoverable or usable across all contexts within Teams. Publishing your bot to the marketplace can increase its visibility and make it easier to use across different teams and channels. However, even if it’s not on the marketplace, you should still be able to configure it for wider access if you handle the permissions and manifest settings correctly.

    1. Testing and Debugging
    • Check the Manifest: Review the manifest.json file for any potential issues or missing configurations.
    • Bot Registration: Ensure the bot is registered correctly in the Azure Bot Service and that it’s properly configured to respond to mentions and commands.
    • Permissions: Verify that the bot has the necessary permissions and that it has been granted the required access to the Teams it needs to interact with.

    By ensuring that these elements are properly configured, you should be able to make your bot available and functional across all relevant conversations and channels in Microsoft Teams.

    Reference Documentation-https://learn.microsoft.com/en-us/azure/bot-service/index-bf-sdk?view=azure-bot-service-4.0

    0 comments No comments

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.