Skip to content

Latest commit

 

History

History
58 lines (45 loc) · 4.43 KB

azure-bot-channels-registration.md

File metadata and controls

58 lines (45 loc) · 4.43 KB

Create the resource group

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.

  1. In your browser, sign into the Azure portal.
  2. In the left navigation panel, select Resource groups.
  3. 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:
    1. Subscription. Use your existing subscription.
    2. Resource group. Enter the name for the resource group. An example could be TeamsResourceGroup. Remember that the name must be unique.
    3. From the Region drop-down menu, select West US, or a region close to your applications.
    4. Select the Review and create button. You should see a banner that reads Validation passed.
    5. 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.

Create the bot channels registration

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.

  1. In the Azure portal, under Azure services, select Create a resource.
  2. In the search box enter "bot". And in the drop-down list, select Bot Channels Registration.
  3. Select the Create button.
  4. In the Bot Channel Registration blade, provide the requested information about your bot.
  5. 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.
  6. Click Microsoft App ID and password and then Create New.
  7. Click Create App ID in the App Registration Portal link.
  8. In the displayed App registration window, click the New registration tab in the upper left.
  9. Enter the name of the bot application you are registering, we used BotTeamsAuth (you need to select your own unique name).
  10. For the Supported account types select Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).
  11. Click the Register button. Once completed, Azure displays the Overview page for the application.
  12. Copy and save to a file the Application (client) ID value.
  13. In the left panel, click Certificate and secrets.
    1. Under Client secrets, click New client secret.
    2. Add a description to identify this secret from others you might need to create for this app.
    3. Set Expires to your selection.
    4. Click Add.
    5. Copy the client secret and save it to a file.
  14. 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.
  15. Click OK.
  16. 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.

  1. In the Azure portal, under Azure services, select the Bot Channel Registration you just created.
  2. In the left panel, click Channels.
  3. 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.