Contents

Migrate your Bot Framework or Azure Bot Service preview bot to Azure Bot Service the right way

Microsoft has GAed the Azure Bot Service a couple of weeks ago, which was a huge step forward for all of us who are doing bots and AI apps in the Microsoft ecosystem. With this step, Microsoft is also pushing one more area into the Azure portal which is bots. Remember, during the preview, you had to create your bot in the Bot Framework portal  and add your channels and everything related to your bot in that specific portal. Now with the transition to the GA status, they migrated that management tasks into the Azure portal, which definitively makes sense as the bots run in Azure. With that move, Microsoft also informed the customers that they need to manually “migrate” the bots, which have been created in the Bot Framework portal into Azure Bot Service bots which will be fully managed in the Azure portal. The migration flow as it is can be seen in the following steps:

1. Bot Framework Portal - Start Migration

When you log in to the Bot Framework portal, you simply need to choose the bot which you want to migrate and click migrate:

After clicking migrate, it will display you some basic information about your Azure environment:

Now you need to accept the new terms of service (as usual) ;)

And once your bot service migration is finished (which can take a couple of minutes), you will be presented with the following screen:

2. Azure Portal - New Bot Management tools

Now your bot is fully migrated to the Azure Bot Service and it should be in the list of bots in the Azure portal, where you can click on it to manage it. When you view your bot’s details in the portal you will see the following information:

This bot is migrated from the old Azure Bot Service. You can rollback the migration in order to have access to your old bot before 03/31/2018. After 03/31/2018, the old service will be deprecated.

This can be done by browsing to the Bot Framework portal and hitting “Roll back migration”:

This means that you can roll back your bot’s migration until the end of March, in case you have any problems with your bot after the migration. And I’m pretty sure you will run into errors when you have a bot which is running NodeJS. As I tried to test my bot in the web chat window from the Azure Portal, I faced the following issue after the migration “couldn’t send retry”:

So I debugged the bot and quickly found the error in the debug console:

As the bot has been migrated, you also need to re-install all your dependencies (at least for NodeJS bots) in order to have them act properly again. So the easiest way to do this is to navigate to the Kudu console (which can be found on your bot’s advanced settings page in the Azure Portal “Advanced Tools”) or you can simply navigate to https://.scm.azurewebsites.net/ debugconsole and there you have to navigate “D:\home\site\wwwroot\messages” and execute “npminstall” as follows:

After the installation of the dependencies have been successfully installed you should be good to go to test your bot again and it should be up and running:

This is something quite obvious but you might forget about it when migrating and therefore it could cause a lot of problems, when your bot is not responding…