1
votes

I just started working on Bot framework. I have created new bot application and deployed it on my local cluster. When i tested it from bot framework emulator only by using the localhost endpoint the bot is working as expected.

enter image description here

Now I have created a bot channel registration and connected it to Web Chat.

enter image description here

This gives me the app id and secret. Now when I enter this app id and secret into my appsettings.json and again try to hit the bot emulator, this time entering the App Id and Password it is throwing 401 authentication error. Any help what might be causing this issue ? Do I need to introduce any dependency in my code ? Can this be any problem of https vs http ?

enter image description here

2
Is /v1.0/graphBot/bot the endpoint you have defined in your index.js to receive messages? Typically this would just be api/messages.billoverton

2 Answers

1
votes

Not sure how you are defining your AAD, but I will suggest you to check the following document, which guide how to add AAD to your bot correctly: https://docs.microsoft.com/en-us/previous-versions/azure/bot-service/bot-builder-tutorial-authentication?view=azure-bot-service-3.0&tabs=aadv1

Thanks.

0
votes

On investigation it turned out to be that the IConfiguration was not loading appsettings.json file, hence app id and password weren't getting picked up by the adapter. Passing app id and password manually in the adapter fixed the issue.