Search code examples
botframeworkazure-bot-service

Bot Authentication


I am trying to authenticate user from my bot using azure active directory.

I have done all the steps accordingly as per official documentation.

Unfortunately,while I run the bot emulator it doesn't prompt user login and anything only shows 401 directline.conversationUpdate. See the screen shot below:

enter image description here

I am trying this example from Git Hub

Note: I have also integrated ngrok exe and configured like below:

enter image description here


Solution

  • Based on your capture, pls have a check that if you have configed your app id and secret correctly as 401 error means you have not authorized successfully. At this period, the most related thing here is app id and secret. You can find app id here in your bot : enter image description here And click "Manage" to create a secret. Once the auth card pompted up, pls make sure that your account to login belongs to the tenant that you configed in OAuth Connection Settings on Azure portal.