none
Configuring Bot Channel registration with Linux Web App RRS feed

  • Question

  • Hi,

    I have resource group with App Service, Channel Bot Registration and App Service plan.

    App service runs my bot in nodejs. Since this is a linux app I had to manually create Channel Bot Registration and I need to configure App Service as well. Since there is an issue with fetching app secret from settings in Channel Bot Registration I went to App Registrations for the AppId and I created new password there for my bot.

    Having both I have added them to App Service as environment variables and have used them in .env file being deployed. I know they are set correctly as I can print them out in the log.

    Now when I go to the Test in Web Chat feature in Channel Bot Registration and post a message to my bot i get info in logs:

    2019-11-09T20:26:22.776235858Z  Error: Unauthorized. Invalid AppId passed on token: a13e79fd-aaaa-aaaa-aaaa-be820a0e3d80
    2019-11-09T20:26:22.776247258Z     at /home/site/wwwroot/node_modules/botframework-connector/lib/auth/channelValidation.js:86:23
    2019-11-09T20:26:22.776256558Z     at Generator.next (<anonymous>)
    2019-11-09T20:26:22.776265459Z     at fulfilled (/home/site/wwwroot/node_modules/botframework-connector/lib/auth/channelValidation.js:5:58)

    What am I doing wrong here?

    Saturday, November 9, 2019 8:32 PM

All replies

  • Hi Michal,

    Thanks for reaching out to us. 

    If you are using a Direct Line user ids, they need to start with “dl_”. Add the prefix to the id, and the request should work fine. For more details, take a look at the Direct Line documentation regarding Generating a Direct Line Token. If not, it looks like there is an issue with your app id and password in your bot. Can you make sure that your environment variables are configured correctly? You can make sure everything is configured correctly by messaging the bot in the Test in Web Chat blade in your Bot Channels Registration in Azure.

    Please refer to following document to make sure you are using the right APPID: https://blog.botframework.com/2018/07/03/find-your-azure-bots-appid-and-appsecret/

    Regards,

    Yutong

    Tuesday, November 12, 2019 12:49 AM
    Moderator