microsoft / BotBuilder-Samples

Welcome to the Bot Framework samples repository. Here you will find task-focused samples in C#, JavaScript/TypeScript, and Python to help you get started with the Bot Framework SDK!
https://github.com/Microsoft/botframework
MIT License
4.32k stars 4.85k forks source link

The bot's Microsoft App Id or Microsoft App Password is incorrect. #1823

Closed r3dr4gon closed 4 years ago

r3dr4gon commented 4 years ago

Sample information

  1. Sample type: QnABot
  2. Sample language: dotnetcore
  3. Sample name: csharp_dotnetcore\11.qnamaker

Describe the bug

When leaving "MicrosoftAppId" & "MicrosoftAppPassword" empty (in appsettings.json), running the bot locally and open the bot emulator (v4), I have no problem and the bot is working well. However, when I add "MicrosoftAppId" & "MicrosoftAppPassword" I get "The bot's Microsoft App Id or Microsoft App Password is incorrect.". This happen locally and in the cloud. In the cloud I get this error: "There was an error sending this message to your bot: HTTP status code GatewayTimeout".

To Reproduce

Steps to reproduce the behavior:

  1. open QnABot sample.
  2. add all the values in the appsettings.json
  3. run the bot locally.
  4. open chatbot emulator, fill the local gost link and the MicrosoftAppId & MicrosoftAppPassword fields.

Expected behavior

working :D espically locally.

Screenshots

appsettings.json: image locally: 1. image 2. image cloud: 1. image 2. image

Additional context

I actully had it all working a few weeks ago, then when I tried to recreate everything in the cloud (again) this keep giving me problems. To generate the id and pass i used this command: az ad app create --subscription "XXX" --display-name "MM-ChatBot-WAbot" --password "XXX" --available-to-other-tenants

PS I have the same problem with the echobot.

[bug]

r3dr4gon commented 4 years ago

Funny enough I solved this a few seconds after I gave up and post in here. The problem was that altough i created id and pass with the command: az ad app create --subscription "XXX" --display-name "MM-ChatBot-WAbot" --password "XXX" --available-to-other-tenants and altough i got an output from this command it seems like it did not really created anything. I asked my manger which have adamin rights in the spesific subscription to run the same command himself and that solved my problem (altough he got the same ID and gave same password as i did).