azure-active-directorymicrosoft-teamsmicrosoft-graph-teamsazure-bot-serviceteams-toolkit

Missing Environment Variable 'BOT_ID' While Registering Microsfot Teams Bot App, while using Teams tool Kit template


I was able to run the Teams bot app using the Teams Toolkit without any issues. However, when I attempted to configure the bot capability within the Teams app by following the instructions provided in the link below, I have received an error:

https://github.com/OfficeDev/teams-toolkit/wiki/How-to-configure-Bot-capability-within-your-Teams-app#move-the-application-to-azure

I carefully followed the steps for restructuring the folder as outlined, but I encountered an error during the provision lifecycle stage. code The error being received is The program cannot proceed as the following environment variables are missing: 'BOT_ID', which are required for file. Typically, the botAadApp/create step in the YAML file should create the bot app and update the environment file with the bot ID and password. Therefore, this error is somewhat confusing.

Could you assist with resolving this issue?

I followed the official documentation link to do this registration, however the error I am receiving is not giving sufficient details. https://github.com/OfficeDev/teams-toolkit/wiki/How-to-configure-Bot-capability-within-your-Teams-app#move-the-application-to-azure


Solution

  • Teams Toolkit executes these actions in sequence. Since teamsApp/zipAppPackage action consumes BOT_ID, you should put botAadApp/create action before teamsApp/zipAppPackage action.