The resource group and the service plan aren't strictly necessary, but they allow you to conveniently release the resources you create. This is good practice for keeping your resources organized and manageable.
You use a resource group to create individual resources for the Bot Framework. For performance, ensure that these resources are located in the same Azure region.
- In your browser, sign into the Azure portal.
- In the left navigation panel, select Resource groups.
- In the upper left of the displayed window, select Add tab to create a new resource group. You'll be prompted to provide the following:
- Subscription. Use your existing subscription.
- Resource group. Enter the name for the resource group. An example could be TeamsResourceGroup. Remember that the name must be unique.
- From the Region drop-down menu, select West US, or a region close to your applications.
- Select the Review and create button. You should see a banner that reads Validation passed.
- Select the Create button. It may take a few minutes to create the resource group.
TIP: As with the resources you'll create later in this guide, it's a good idea to pin this resource group to your dashboard for easy access. If you'd like to do so, select the pin icon 📌 in the upper right of the dashboard.
- In the Azure portal, on the left navigation panel, select Create a resource.
- In the search box, type App Service Plan. Select the App Service Plan card from the search results.
- Select Create.
- You'll be asked to provide the following information:
- Subscription. You can use an existing subscription.
- Resource Group. Select the group you created earlier.
- Name. Enter the name for the service plan. An example could be MeetingTokensServicePlan. Remember that the name must be unique, within the group.
- Operating System. Select Windows or your applicable OS.
- Region. Select West US or a region close to your applications.
- Pricing Tier. Make sure that Standard S1 is selected. This should be the default value.
- Select the Review and create button. You should see a banner that reads Validation passed.
- Select Create. It may take a few minutes to create the app service plan. The plan will be listed in the resource group.
The bot channels registration registers your web service as a bot with the Bot Framework, provided you have a Microsoft App Id and App password (client secret).
IMPORTANT: You only need to register your bot if it is not hosted in Azure. If you created a bot through the Azure portal then it is already registered with the service. If you created your bot through the Bot Framework or AppStudio your bot isn't registered in Azure.
-
In the Azure portal, under Azure services, select Create a resource.
-
In the search box enter "bot". And in the drop-down list, select Bot Channels Registration.
-
Select the Create button.
-
In the Bot Channel Registration blade, provide the requested information about your bot.
-
In the Messaging endpoint box, use same ngrok endpoint created earlier and append
/api/messages
to that endpoint. Example:https://f631****.ngrok.io/api/messages
.- The following picture shows an example of the registration settings:
-
Click Microsoft App ID and password and then Create New.
-
Click Create App ID in the App Registration Portal link.
-
In the displayed App registration window, click the New registration tab in the upper left.
-
Enter the name of the bot application you are registering, we used BotTeamsAuth (you need to select your own unique name).
-
For the Supported account types select Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).
-
Click the Register button. Once completed, Azure displays the Overview page for the application.
-
Copy and save to a file the Application (client) ID value.
-
In the left panel, click Certificate and secrets.
- Under Client secrets, click New client secret.
- Add a description to identify this secret from others you might need to create for this app.
- Set Expires to your selection.
- Click Add.
- Copy the client secret and save it to a file.
-
Go back to the Bot Channel Registration window and copy the App ID and the Client secret in the Microsoft App ID and Password boxes, respectively.
-
Click OK.
-
Finally, click Create.
After Azure has created the registration resource it will be included in the resource group list.
Once your bot channels registration is created, you'll need to enable the Teams channel.
- In the Azure portal, under Azure services, select the Bot Channel Registration you just created.
- In the left panel, click Channels.
- Click the Microsoft Teams icon, then choose Save.
NOTE: The Bot Channels Registration resource will show the Global region even if you selected West US. This is expected.