简体   繁体   中英

401 unauthorized error when registered a MS Teams bot using Azure Bot

I used "Teams Toolkit [Preview]" in VS2019 to develop a MS Teams bot. If I registered my bot via https://dev.botframework.com/bots/new , I can test that from MS Teams UI without problems. however when I registered the bot from Azure Bot service by using a existing Azure AD application which I created separately, I see "401 unauthorized" error message shown up in my ngrok screen and MS Team bot didn't work. Previously I used "Bot Channel registration" from Azure, it worked fine. As "Azure Bot" replaced "Bot Channel Registration" and "Azure Web Bot", I am trying to figure out why "Azure Bot" didn't work. Can anyone share a latest instruction how to use Azure Bot to create a MS Team Bot?

The steps to create a teams bot is essentially the same, it's just that Bot Framework Registration has been replaced by Azure Bot . The Azure Bot resource should still have all of the same Configuration and Channel registration options available.

You might find the Teams conversation bot sample helpful. Just remember that on step 4, you'll create an Azure Bot resource instead of a Bot Framework Registration resource.

You might also check for common pitfalls, such as forgetting to add /api/messages in the configuration in Azure, pointing ngrok to the wrong port, or typos of appId or other credentials in the bot settings or Teams manifest. These easy to do mistakes can usually cause those errors.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM