简体   繁体   中英

How to configure v3 Bot using Azure Bot Service

We are running chatbots using BotFramework v3. Now Microsoft changed from 'Bot Channel Registration' to 'Azure Bot' service which uses a key vault. Until that the bot had to be configured by storing the Microsoft app id and app password in Web.config or the app services app settings. Now we only get the app id but no password because it's managed by identities and stored in the key vault.

Incoming messages arrive at the bot but outgoing messages raises 'Unauthorized' error.

How can we configure the BF v3 bot correctly? We used UserAssignedMSI as bot type.

Bot Framework v3 is deprecated alongside the Bot Channels Registration. Support for v3 ended in 2019, and as such it is no longer recommended to use v3.

While existing workloads will continue to work, you should not modify the Azure resources unnecessarily. Support for the UserAssignedMSI application type in Azure Bots is new. If you want to use the newer Azure Bot resource and app types, you will need to upgrade your bots to SDK v4. Refer to the migration documentation for details on migrating bots from v3 to v4.

Thanks to AP01, this was very useful.

Creating a Azure Bot resource of type MultiTenant solved my problem. Under "Configuration" you can manage the app password and generate a new secret. Be sure to set its lifetime to 24 month and make a note to your future self to renew it after 2 years. Set the MicrosoftAppId and MicrosoftAppPassword in the web-apps app settings and MicrosoftAppType to MultiTenant .

There is no need for creating a key vault and an identity resource (I got these 2 when I've created the Azure Bot resource of type UserAssignedMSI ).

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