In order to create a bot you need to first register it in the Azure portal.
- Choose to Create a resource, or alternatively go to an existing resource group and click Add
- Search for Bot channels registration and then click Create
- Give the bot a handle (ex:
timelyMessageExtensionBot
), choose your subscription and resource group - For the messaging endpoint, use this:
https://timely.azurewebsites.net/api/messages
- Choose to Auto create Microsoft App ID and Password
- Click Create
- Wait for Azure to finish its magic and when done choose to go to resource
- On the bot page choose Channels and choose to add Microsoft Teams as a channel
- Next, choose the Settings and click on Manage next to Microsoft App Id
- In the Bot app portal, generate a new app password and store it securely - you will need them for your
.env
file or add them as application settings for the hosting web site (see below)
The App Id and App Secret, generated during the registration, for the bot are read from the MICROSOFT_APP_ID
and MICROSOFT_APP_PASSWORD
environment variables, specified in the .env
file. These can be configured in the Azure Web App under Application Settings > App Settings.