Add bots for private chats and channels in Microsoft Teams
The new Microsoft Teams & Skype for Business 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 Office 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 & Skype for Business Admin Center. For more information, see Manage Teams during the transition to the new Microsoft Teams and Skype for Business 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 features in your Office 365 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.
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.
- Select More (...) next to the team name.
- Select Manage team and then select the Apps tab.
- At the bottom-right of your screen, select Upload a custom app.
- Browse to the location of your app package, select it, and then click Open.