Search code examples
c#.netazurebotframeworkmicrosoft-teams

The bot encountered an error or bug. To continue to run this bot, please fix the bot source code


I am a beginner in Azure BOT development. I am trying to run a sample source code in the following GitHub repo ( Developed in .net core 3.1 C# ). https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/graph-proactive-installation/csharp

I had configured the MicrosoftAppId , MicrosoftAppPassword, TeamsappcatalogAppId values in the appsettings.json file. ngrok was already configured successfully. When I try to connect the BOT with the emulator the source throws an exception like the below image.

exception.Message = "Value cannot be null. (Parameter 'key')"

enter image description here

Then it will throw the error message

enter image description here

What am I missing in the configuration?


Solution

  • This is custom Bot sample created for Teams, I don't think it will work on all the channels e.g., Emulator/WebChat etc.

    I think you should try running it on Teams itself. Also make sure that you have configured the Teams Channel on Azure Bot Service.

    You can refer this link for available Bot SDK samples.