MS Teams ChatBot Installation

Creating and Configuring an Azure Bot for Microsoft Teams

Overview

Azure Bot Service is a versatile platform hosted and developed on Microsoft Azure, designed to create and deploy chatbots. It allows bots to be utilized across various platforms and channels such as websites, mobile applications, Microsoft Teams, Skype, Facebook Messenger, and more.

Azure Bot Service equips developers with a range of tools and services, including natural language processing (NLP) capabilities, enabling bots to interact naturally with users through text or speech. Additionally, it integrates with the Azure Bot Framework, offering a variety of APIs and resources for developers to customize and enhance their bots.

This service allows businesses to automate and improve a multitude of tasks, from customer support to information dissemination, by creating efficient and responsive chatbots. Bots can be programmed to answer user questions, provide services, or perform specific tasks, thereby streamlining operations and enhancing user engagement.

In summary, the Azure Bot resource provides the essential infrastructure for a bot to access secured resources and enables communication with users through various channels like Web Chat. This guide will help you set up and configure an Azure Bot for seamless integration with Microsoft Teams, ensuring robust and dynamic interactions with your users.

Creating the Bot

You can follow the video of MS Teams bot creation. The steps on the video are listed below.

1. Access the Azure Portal

Instruction: Go to the Azure portal.

Detailed Guide: Visit the Azure Portal to manage your Azure resources.

Implementation Steps:

  1. Open your web browser.

  2. Navigate to Azure Portal.

Microsoft Documentation Link: Azure Portal

2. Create a New Resource

Instruction: Under the Azure Services, select Create a resource.

Detailed Guide: Once in the Azure Portal, look for the "Azure Services" section on the main dashboard. Click on Create a resource.

Implementation Steps:

  1. In the Azure Portal, locate the "Azure Services" section.

  2. Click on Create a resource.

Microsoft Documentation Link: Create a resource in Azure

3. Search for Azure Bot

Instruction: In the search box, enter bot, then press Enter. Select the Azure Bot card.

Detailed Guide: In the "Create a resource" page, you will find a search box. Enter bot and press Enter. From the search results, select the Azure Bot card.

Implementation Steps:

  1. In the "Create a resource" page, find the search box.

  2. Enter bot and press Enter.

  3. From the search results, select the Azure Bot card.

Microsoft Documentation Link: Create a bot with Azure Bot Service

4. Create the Azure Bot

Instruction: Select Create. Enter the required values.

Detailed Guide: Click the Create button. You will need to enter several required values:

  • Bot handle: A unique identifier for your bot.

  • Subscription: Choose your Azure subscription.

  • Resource Group: Either create a new resource group or use an existing one.

  • Region: Select the appropriate region.

  • Implementation Steps:

  1. Click the Create button.

  2. Enter the required values:

    • Bot handle: A unique identifier for your bot.

    • Subscription: Choose your Azure subscription.

    • Resource Group: Either create a new resource group or use an existing one.

    • Region: Select the appropriate region.

5. Review and Create

Instruction: Select “Review + create.” If the validation passes, select Create. You should see the Azure Bot and the related key vault resources listed in the resource group you selected.

Detailed Guide: After filling in the required fields, click Review + create. If the validation passes, click Create.

Implementation Steps:

  1. Click Review + create.

  2. If validation passes, click Create.

Microsoft Documentation Link: Create a resource in Azure

6. Go to Resource

Instruction: After the Create process is completed, select Go to Resource.

Detailed Guide: Once the creation process is complete, click on Go to resource to access your Azure Bot.

Implementation Steps:

  1. After the creation process completes, click Go to resource.

Microsoft Documentation Link: Manage resources in the Azure portal

7. Configure Channels

Instruction: On the resource page, click Channels on the left side panel.

Detailed Guide: On the Azure Bot resource page, look for the Channels option in the left-side panel and click it.

Implementation Steps:

  1. On the Azure Bot resource page, find the Channels option in the left-side panel.

  2. Click Channels.

Microsoft Documentation Link: Connect a bot to channels

8. Add Microsoft Teams Channel

Instruction: On the Channel page, click on Microsoft Teams and accept the Terms of Service. On the next page, select Microsoft Teams Commercial option and then click Apply at the bottom of the page.

Detailed Guide: In the Channels page, find and click on Microsoft Teams. Review and accept the Terms of Service. On the next page, select Microsoft Teams Commercial and click Apply.

Implementation Steps:

  1. In the Channels page, click on Microsoft Teams.

  2. Review and accept the Terms of Service.

  3. On the next page, select Microsoft Teams Commercial and click Apply.

9. Configure Messaging Endpoint and Application ID

Instruction: Select Configuration from the left side pane to fill the configuration fields like Messaging Endpoint and having Application ID and defining Application Password.

Detailed Guide: Navigate to the Configuration section in the left-side pane. Fill in the Messaging Endpoint with your Autom Mate Flow Webhook URL. Note down your Microsoft App ID, which will be used for creating App Credentials under Autom Mate’s Vault module. Next to the Microsoft App ID label, click Manage Password to define the Application Password.

Implementation Steps:

  1. Navigate to the Configuration section in the left-side pane.

  2. Fill in the Messaging Endpoint with your Autom Mate Flow Webhook URL.

  3. Note down your Microsoft App ID.

  4. Next to the Microsoft App ID label, click Manage Password to define the Application Password.

Microsoft Documentation Link: Configure your bot

10. Manage Password

Instruction: To define Microsoft Password, click on Manage Password right next to Microsoft App ID Label. After you click Manage Password, select New client secret.

Detailed Guide: After clicking Manage Password, select New client secret.

Implementation Steps:

  1. Click Manage Password next to the Microsoft App ID label.

  2. Select New client secret.

Microsoft Documentation Link: Add a client secret

11. Create Client Secret

Instruction: On the right side pane, fill the Description field to specify your Client secret’s friendly name and select one option to define Expire date of your client secret. Also, you can define a custom date as well. Click Add to save your Client secret. Copy your client secret by clicking right next to the created Value column.

Detailed Guide: On the right-side pane, fill in the Description field with a friendly name for your client secret. Choose an expiration date or set a custom date. Click Add to save the client secret. Copy your client secret from the value column.

Implementation Steps:

  1. On the right-side pane, fill in the Description field with a friendly name for your client secret.

  2. Choose an expiration date or set a custom date.

  3. Click Add to save the client secret.

  4. Copy your client secret from the value column.

Microsoft Documentation Link: Add a client secret

12. Customize Your Bot

Instruction: If you want to customize your bot, click Branding & properties. To customize your bot with your company’s assets like Logo, website URL, terms of service URL, privacy statement URL, etc., fill in the necessary fields.

Detailed Guide: Go to Branding & properties to customize your bot with your company's assets. Fill in details like logo, website URL, terms of service URL, privacy statement URL, etc.

Implementation Steps:

  1. Click Branding & properties.

  2. Fill in the necessary fields such as logo, website URL, terms of service URL, and privacy statement URL.

Microsoft Documentation Link: Customize bot branding

13. Publish the Bot as an App on Developer Portal

Instruction: After creating the Azure bot on Azure Portal, publish the bot as an app on the developer portal. Go to Developer Portal. Click “Apps” from the left-side pane.

Detailed Guide: Go to the Developer Portal. From the left-side pane, select Apps.

Implementation Steps:

  1. Go to the Developer Portal.

  2. From the left-side pane, select Apps.

Microsoft Documentation Link: Overview of Teams Developer Portal

14. Create a New App

Instruction: Click “New App” from the top nav bar. Enter the name of the app and click “Add”.

Detailed Guide: Click New App from the top navigation bar. Enter the name of your app and click Add.

Implementation Steps:

  1. Click New App from the top navigation bar.

  2. Enter the name of your app.

  3. Click Add.

Microsoft Documentation Link: Create your first Microsoft Teams app

15. Fill Basic Information

Instruction: Fill the required fields under the “Basic Information” section. Fill the “Application (Client) ID” field with the ID value of your Azure Bot. After you fill all required fields, click “Save”.

Detailed Guide: Complete the required fields under the Basic Information section. In the Application (Client) ID field, enter the ID value of your Azure Bot. Click Save.

Implementation Steps:

  1. Complete the required fields under the Basic Information section.

  2. In the Application (Client) ID field, enter the ID value of your Azure Bot.

  3. Click Save.

Microsoft Documentation Link: Teams app manifest

16. Set Permissions

Instruction: From the left sidebar, click on “Permissions”. On the permissions page, select “ChannelMessage.Read.Group and ChannelMessage.Send.Group” permissions under Teams Permission. Select “ChatMessage.Read.Chat and ChatMessage.Send.Chat“ permissions under "Chat/Messaging Permissions". Save all changes.

Detailed Guide: From the left sidebar, click on Permissions. Under Teams Permission, select ChannelMessage.Read.Group and ChannelMessage.Send.Group. Under Chat/Messaging Permissions, select ChatMessage.Read.Chat and ChatMessage.Send.Chat. Save all changes.

Implementation Steps:

  1. From the left sidebar, click on Permissions.

  2. Under Teams Permission, select ChannelMessage.Read.Group and ChannelMessage.Send.Group.

  3. Under Chat/Messaging Permissions, select ChatMessage.Read.Chat and ChatMessage.Send.Chat.

  4. Save all changes.

Microsoft Documentation Link: Set permissions for Microsoft Teams apps

17. Configure Bot Features

Instruction: After saving permissions' information, click on "App Features" from the left sidebar. On the App Features page, click on Bot. Fill the Bot ID field with your Bot’s app ID and check the checkboxes under the scopes. Then click Save.

Detailed Guide: Click on App Features from the left sidebar. On the App Features page, click on Bot. Enter the Bot ID with your Bot’s app ID. Check the appropriate checkboxes under the scopes. Click Save.

Implementation Steps:

  1. Click on App Features from the left sidebar.

  2. On the App Features page, click on Bot.

  3. Enter the Bot ID with your Bot’s app ID.

  4. Check the appropriate checkboxes under the scopes.

  5. Click Save.

18. Publish the App

Instruction: Click “Publish” from the top-right corner to download the app package. Click “Download the app package” to use the package on publishing process. A zip file will be downloaded automatically and it should include manifest JSON, color, and outline image files.

Detailed Guide: Click Publish from the top-right corner to download the app package. Click Download the app package to download a zip file that includes the manifest JSON, color, and outline image files.

Implementation Steps:

  1. Click Publish from the top-right corner to download the app package.

  2. Click Download the app package to download a zip file that includes the manifest JSON, color, and outline image files.

Microsoft Documentation Link: Publish your app

19. Test the App

Instruction: Before publishing the app package, test it by going to the Teams app validator page. Click “Upload manifest package” and select the downloaded zip file to validate your package. The test must be successful, otherwise possible errors must be corrected and the testing process must be started again.

Detailed Guide: Go to the Teams App Validator. Click Upload manifest package and select the downloaded zip file to validate your package. Ensure the test is successful; if there are errors, correct them and re-test.

Implementation Steps:

  1. Click Upload manifest package and select the downloaded zip file to validate your package.

  2. Ensure the test is successful; if there are errors, correct them and re-test.

Microsoft Documentation Link: Validate your Microsoft Teams app

20. Upload the App to Teams Admin Center

Instruction: To publish your app package, go to Teams Admin Center. Click “Upload new app” from the apps page. Click “Upload” and select the downloaded package that you created on the developer portal. The custom app should be uploaded successfully and the success modal should appear on the screen. You should see your app on the list by searching for the name of your app.

Detailed Guide: Go to the Teams Admin Center. From the Apps page, click Upload new app. Click Upload and select the downloaded package. The custom app should be uploaded successfully, and a success modal should appear on the screen. Verify your app is listed by searching for its name.

Implementation Steps:

  1. From the Apps page, click Upload new app.

  2. Click Upload and select the downloaded package.

  3. The custom app should be uploaded successfully, and a success modal should appear on the screen.

  4. Verify your app is listed by searching for its name.

Microsoft Documentation Link: Manage apps in Teams Admin Center

21. Chat with Your Bot

Instruction: To chat with your bot, go to Microsoft Teams on your computer. Click “Apps” from the left side pane and search for your app name that you just published. You should see that your bot has appeared. Click “Add”.

Detailed Guide: Open Microsoft Teams on your computer. From the left-side pane, click Apps and search for your app name. Click Add to start chatting with your bot.

Implementation Steps:

  1. Open Microsoft Teams on your computer.

  2. From the left-side pane, click Apps.

  3. Search for your app name.

  4. Click Add to start chatting with your bot.

Microsoft Documentation Link: Add and manage apps in Microsoft Teams

Last updated