BotFramework: The bot's MSA appId or password is incorrect

烂漫一生 提交于 2021-02-10 20:52:10

问题


Issue: Bot started showing me an error, when using the emulator. While i am not sure, i think the emulator might have been updated

Debugging I checked that the AppID and secret are correct.

Error:

-> POST 401 [conversationUpdate]

Error: The bot's MSA appId or password is incorrect. 

Edit your bot's MSA info 

web.config Info:

<!-- update these with your appid and one of your appsecret keys-->
<add key="MicrosoftAppID" value="XXXXXXXXXXXXXX" />
<add key="MicrosoftAppPassword" value="YYYYYYYYYY" />
<!--Azure Credentials (V1 Authentication Mode) -->
<add key="ActiveDirectory.Mode" value="v1" />
<add key="ActiveDirectory.ResourceId" value="https://graph.windows.net/" />
<add key="ActiveDirectory.EndpointUrl" value="https://login.microsoftonline.com" />
<add key="ActiveDirectory.Tenant" value="ZZZZZZZ" />
<add key="ActiveDirectory.ClientId" value="aaa" />
<add key="ActiveDirectory.ClientSecret" value="bbb" />
<add key="ActiveDirectory.RedirectUrl" value="http://localhost:25601/api/OAuthCallback" />

回答1:


Keep the Microsoft APP ID and Microsoft App Password values empty both in web.config file and the emulator when debugging locally.

and in the web.config:

<configuration>
  <appSettings>
    <!-- update these with your BotId, Microsoft App Id and your Microsoft App Password-->
    <add key="BotId" value="YourBotId" />
    <add key="MicrosoftAppId" value="" />
    <add key="MicrosoftAppPassword" value="" />
  </appSettings>



回答2:


Create an empty project with Bot template(or use existing bot project) and update the bot builder version from Visual studio NuGet package to latest version. Try to test it with latest bot emulator (https://docs.botframework.com/en-us/tools/bot-framework-emulator/) it should work



来源:https://stackoverflow.com/questions/47046470/botframework-the-bots-msa-appid-or-password-is-incorrect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!