Add bots for private chats and channels in Microsoft Teams
The new Microsoft Teams admin center is here! Starting in March 2018, we've been gradually migrating settings to it from both the current Skype for Business admin center and the Microsoft Teams experience in the Microsoft 365 admin center. If a setting has been migrated, you'll see a notification and then be directed to the setting's location in the new Microsoft Teams admin center. For more information, see Manage Teams during the transition to the new Microsoft Teams admin center.
Bots are automated programs that respond to queries or give updates and notifications about details users find interesting or want to stay informed about. Bots allow users to interact with cloud services like task management, scheduling, and polling, through chat conversations in Microsoft Teams. Bots for Microsoft Teams are built on the Microsoft Bot Framework. The bots that are developed using this framework can be enabled easily for Microsoft Teams. For more information, see Manage Microsoft Teams settings for your organization.
Currently, Microsoft Teams support bots in private chats and channels within a team. Administrators can control whether the use of bots is allowed or prohibited within the Office 365 tenant.
Bots developed by the community can be leveraged within Microsoft Teams. The bot’s functionality and bot’s side loading must be enabled on the tenant level for custom bots to be functional. Bots can be used in private chats or in channels. For channels, team owners or members can add bots.
For more information, see the section "Using bots" in Apps and services.
Adding a bot by GUID, for anything other than testing purposes, is not recommended. Doing so severely limits the functionality of a bot. Bots in production use should be added to Teams as part of an app. See Create a bot and Test and debug your Microsoft Teams bot
Create custom bots for Microsoft Teams
You can easily create a bot that integrates in to your LOB applications, using the Microsoft Bot Framework. Please refer to Creating and Testing a bot for Microsoft Teams guidance to learn how you can develop and publish your own bots.
When you create a bot and register it with the Bot Framework, you can choose to publish it. If you don't publish it, the bot remains private. You can also require your users to log in before using the bot. Requiring login makes sure only employees of your organization can access the bot, even if the bot's application ID becomes known. See AuthBot on GitHub for a code example of how to authenticate users against your Active Directory using bots.
Bots can be tested using the Bot Framework Emulator before they are deployed into your Teams.
Side load your own bot for private chat
After you have created your bot, go to the Application Settings for the bot you developed, then under App settings, copy the value of the MicrosoftAppId setting.
From within Microsoft Teams, on the Chat pane, select the Add chat icon. For To, paste your bot's Microsoft app ID.
The app ID will resolve to your bot name, and then you can initiate a chat conversation with that bot.
Side load your bot for channels
If you want to share your bot with your colleagues, here's how to add it to channels of different teams:
- After you have created an app package for your bot, open Teams and browse to the team in which you'll be side-loading the bot.
- Add App Studio, app to Microsoft Teams.
- In App Studio, select the Manifest Editor Tab.
- To add your bot, In capabilities, select bot and chose to add an existing bot, then you will have the option to chose an existing bot from a drop or enter the Id of one of your existing bots.
- Browse to the location of your app package, select it, and then click Open.
- Select your bot's name (Don't forget to check the "Team" checkbox under the scope section)
- Select the Test and distribute option.
- Select the team where you wish to connect your bot to in the dialog which pops up.
With this, your bot will be available in your Microsoft Team's team.
Send feedback about: