Configure Microsoft Account
Configure HTTPS Endpoint
To connect to Microsoft Teams, an HTTPS endpoint is required. This is set in the
externalUrl field in
botpress.config.json. You can use the following methods to create this endpoint:
- Create an HTTPS tunnel to your machine using Ngrok. This tutorial works on pretty much any Operating System (Tutorial).
- Using Nginx and Let's Encrypt. This tutorial is based on the Linux Ubuntu 16.04 Operating System (Tutorial).
- Use Serveo to create an HTTPS tunnel to your machine (Tutorial).
Before Getting Started...
Since the framework V4 is still in active development, some of these instructions may be slightly different. If you ever get stuck, check the Official Bot Framework documentation.
Create Application & Generate Password
Log on to your account on Microsoft Azure.
In the Azure portal, open the App registrations page.
Click New registration, then choose a name for your application.
In the section Supported account types, choose Accounts in any organizational directory and personal Microsoft accounts, then click Register.
Write down the value of
Application (client) ID. We'll need it later for the channel configuration.
Click Certificates & secrets, then click New client secret, then fill in the required fields.
Write down the value of the generated secret.
You can't access it later.
Create Your Bot
- Navigate to the Bot Framework Registration Page and fill in 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.
On the next page (Connect to channels), under the section, Add a featured channel, click Configure Microsoft Teams Channel, then click Save. No other configuration is needed at this point.
Configure 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 an administrator has disabled your bot, you must enable App sideloading in your Microsoft admin portal. See this article for more details.
You can now continue to next section.
data/bots/<YOUR_BOT_ID>/bot.config.json. In the
messaging.channels.teamssection write this configuration :
enabled: set to
appId: the appId you created in when creating your teams bot
appPassword: the app password you created when creating your teams bot
bot.config.jsonshould look like this :
// ... other data
// ... other channels can also be configured here
Start Botpress, then you should see your Messaging Endpoint in the startup logs.
Open the Bot Framework page, then click the name of your bot.
Click the Settings tab, then scroll down to Messaging endpoint.
Set the value of the endpoint that was displayed in the logs. If it is missing, it should looks like that: