Deploy the Microsoft Teams Bot in Azure and Test in Web Chat

Earlier, we created a new series called Chatbots starting with: What is a Chatbot and how does it work, in that we understood the different types of chatbots like

  • Conversational Chatbots
  • AI-powered Chatbots
  • Task-Oriented Chatbots

And we also came to know the various platforms that support custom Chatbots. We shall deploy the Microsoft Teams bot in Azure Cloud and test in the web chat in this article and the SDKs used to develop the same.

Create a boilerplate code using the Teams Tool Kit

Using the Teams Tool kit, create a basic code that would work locally for simple input messages like ‘welcome’ or ‘learn'.

Provision and Deploy the code to Azure using the Teams Tool Kit

  1. In the same solution where you created the basic chatbot code, open the Teams Tool kit extension.

  2. Make sure you have logged in.

    • Microsoft 365 account for MS Teams
    • Azure Cloud portal

    Azure cloud portal

  3. Click on the Provision under the section Lifecycle.

    Provision

  4. Select the right subscription you want to use for the bot deployment.

    Bot development

  5. Now, you can choose an existing resource group, or you can create a new resource group with the location to deploy all the resources that are required for this chatbot. The resources created by default would be.

    • Azure Bot service
    • Azure App Service
    • Azure App Service Plan
    • Azure Managed Identity(optional – can be chosen if auth is required via AAD)

    Resource group

  6. Confirm the provisioning of resources.

    Visual Studio

  7. Once successfully provisioned, Click on Deploy under the section Lifecycle.

    Lifecycle

  8. Once confirming the deployment, the bot will be ready in the Azure Cloud.

    Visual Studio Code

  9. The confirmation on the deployment can be verified on the output window in the Visual Studio Code.

    Visual Studio Code

  10. Verify the resources provisioned and deployed in the Azure cloud by navigating to the Resource Group created (or used for deployment).

    Resources

To test the deployed bot, go to the Azure Bot resource  and click on the Test in Web Chat from the left panel under Settings.

Test in web chat

While this chatbot is a basic sample bot, you can create additional functionalities like weather bots, currency converters, simple calculators, FAQs, and so on.

If you are interested in a more specific solution in this regard, please leave a comment below.

Please see this is a follow-up from the series Chatbots.

  1. https://www.c-sharpcorner.com/article/what-is-a-chatbot-and-how-does-it-work/
  2. https://www.c-sharpcorner.com/article/create-a-telegram-bot-using-node-js/
  3. https://www.c-sharpcorner.com/article/create-a-microsoft-teams-bot-using-node-js/

Happy Coding! Thank You!!


Similar Articles