Search code examples
botframeworkmicrosoft-teamsazure-deployment-slots

How to Connect MS Teams to Chat Bot Deployed in Azure Bot Service deployment "Development" Slot i.e. NOT the Production/Default Slot


Have created a Development Slot to deploy my Bot and unit test during the development process while the Production/default Slot contains the binaries for tested live ChatBot.

  • We are successfully using MS Teams Channel to connect with the ChatBot hosted in the Production/Default Deployment slot.

Need Inputs

As the ChatBot in Development slot and Production/default slot both point to the same MicrosoftAppId how can I test the ChatBot Binaries in the Development slot in MS Teams as, the MicrosoftAppId is the only reference which the MS Teams Manifest requires to connect to the Chatbot which is obviously same for both slots.


Solution

  • I haven't done exactly this setup, but I'm pretty sure the following would work:

    1. Create a new Bot Channels Registration in Azure - this is a resource in Azure that lets you control a bot, but it's totally unlinked from hosting - it's just a "registration" (the other option in Azure, "Azure Web Bot", is what you've used now, that gives a Bot Channel Registration AND an Azure Web App combined together.
    2. Change your AppId and AppPassword to being Deployment Slot configuration settings. Use your current ones for Prod
    3. For the Dev deployment slot configuration settings, use the App Id and App Password that are generated for you in the Bot Channels Registration you created earlier.
    4. Under "Settings" in your Bot Channels Registration, copy the address from your Production version, but change the first part to match the address of your dev slot (make sure the "/api/messages" is still there.