Microsoft Teams
Requirements
- Microsoft account with access to Azure
- Microsoft account with access to Teams
- Enable the
channel-teams
module - Configured a valid HTTPS external url (configuration)
Before getting started...
Since the framework V4 is still in active development, some of these instructions may be a little bit different. If you ever get stuck, have a look at the Official Bot Framework documentation.
Step by step instructions
These instructions will guide you through any steps required to be up and running with that channel.
1. Create a new application & generate a password
Log on to your account on Microsoft Azure
In the Azure portal, open the App registrations page.
Click on
New registration
, then choose a name for your application.In the section
Supported account types
, chooseAccounts in any organizational directory and personal Microsoft accounts
, then click onRegister
.Write down the value of
Application (client) ID
, we'll need it later for the channel configuration.Click on
Certificates & secrets
, then click onNew client secret
, then fill in the required fields.Write down the value of the generated secret, you can't access it later
2. Create your bot
- Navigate to the Bot Framework Registration Page and fill the required information:
- Display name
- Bot handle
- The Microsoft App ID (that we generated in step 1)
- Messaging endpoint (keep it blank for now - more on that later)
You can also fill the other fields as you wish, but they will not impact Botpress.
Click on
Register
On the next page (
Connect to channels
), under the sectionAdd a featured channel
, click onConfigure Microsoft Teams Channel
, then click onSave
. No other configuration is needed at this point.
3. Configure the channel on Botpress
Open MS Teams (either the web version or the desktop client), then start a new conversation. In the search bar, paste your microsoft App Id. You should see your registered bot.
Try talking to your bot. If you get a message saying that your bot has been disabled by administrator, you have to enable App sideloading in your microsoft admin portal. See this article for more details.
You can now continue to next section.
Copy the file
data/global/config/channel-teams.json
to your bot-specific configuration folder:data/bots/YOUR_BOT_ID/config/channel-teams.json
Open the file, then set
enabled
totrue
, and set yourappId
andappPassword
created in step 1
4. Final configuration
Start Botpress, then you should see your Messaging Endpoint in the startup logs.
Open the Bot Framework page, then click on the name of your bot.
Click on the
Settings
tab, then scroll down toMessaging endpoint
.Set the value of the endpoint that was displayed in the logs. If it is missing, it should looks like that:
YOUR_BASE_URL/api/v1/bots/YOUR_BOT_ID/mod/channel-teams/api/messages