Kelsey Kelsey - 1 month ago 18
C# Question

Bot Framework portal - "Test connection to your bot" 401 Unauthorized

I created a bot application which I've successfully been able to test locally via the emulator.

Following I published the Bot Application to Azure. (which is created as

I then went to the Microsoft Bot Framework portal at and registered the bot, and made sure to set the messaging endpoint to /api/messages

After successfully registering, I updated the MicrosoftAppId & MicrosoftAppPassword keys in web.config.

However, when I try to "Test connection to your bot", all I'm seeing is a message saying


How can I debug where this is coming from?

I've tried running the Bot Framework Channel Emulator, setting the Bot Url to the same url as my Bot has set for Messaging endpoint. This gives me a "401 Unauthorized" message as well, but I can't figure out how/where to debug the reason.

Has anyone experienced this or know what I can do to debug?



Figured it out:

In web.config, the default appSetting keys are

<add key="AppId" value="ID" />
<add key="AppSecret" value="SECRET" />

And in the documentation, we set:

<add key="MicrosoftAppId" value = "ID" />
<add key="MicrosoftAppPassword" value = "SECRET" />

My issue was not updating these appSetting keys to MicrosoftAppId and MicrosoftAppPassword. Once I did this, it worked.