Add bots for personal chats, group 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 Teams are built on the Microsoft Bot Framework. The bots that are developed using this framework can be enabled easily for Teams. For more information, see Manage Microsoft Teams settings for your organization.
Currently, Teams supports bots in personal chats, group 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 Teams. The bot's functionality and the ability to upload custom apps (also known as sideloading) must be enabled on the tenant level for custom bots to be functional. Bots can be used in personal chats, group chats, and channels. For channels, team owners or members can add bots.
For more information, see 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. See the 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.
Upload your bot for personal chat
After you create your bot, go to the Application Settings for the bot you developed, and then under App settings, copy the value of the MicrosoftAppId setting.
In Teams, on the Chat pane, select the Add chat icon. In To, paste your bot's Microsoft app ID.
The app ID will resolve to your bot name, and then you can start a chat conversation with that bot.
Upload your bot for group chats or channels
If you want to share your bot with your colleagues, here's how to add it to group chats or channels of different teams:
After you create an app package for your bot, open Teams and browse to the team in which you'll be uploading the bot.
Add App Studio, app to Teams.
In App Studio, select the Manifest Editor Tab.
To add your bot, in capabilities, select the bot and choose to add an existing bot. Then, choose an existing bot or enter the Id of an existing bot.
Browse to the location of your app package, select it, and then click Open.
Select your bot's name. (Don't forget to select the Group chat or Team check box under the scope section).
Select Test and distribute.
Select the group chat or team where you want to connect your bot to.
Your bot will be available in your group chat or team in Teams.