如何使用Azure Bot服务配置V3机器人
我们正在使用Botframework V3运行聊天机器人。现在,Microsoft从“ Bot Channel注册”更改为使用密钥库的“ Azure Bot”服务。直到该机器人必须通过在Web.config或App Services Services应用程序设置中存储Microsoft App ID和App Password来配置该机器人。现在,我们只能获取应用程序ID,但没有密码,因为它是由身份管理并存储在密钥库中的。
传入消息到达机器人,但传出消息会引起“未经授权”的错误。
我们如何正确配置BF V3机器人?我们将UserAssignedMSI用作bot类型。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Bot Framework V3 IS retected 与机器人通道注册一起。对V3的支持于2019年结束,因此不再建议使用V3。
而现有工作负载将继续工作,您不应不必要地修改Azure资源。支持
userAssignedmsi
Apemant类型Azure Bots是新的。如果要使用较新的Azure机器人资源和应用程序类型,则需要将机器人升级到SDK V4。请参阅迁移文档有关从V3到V4迁移的详细信息。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.多亏了AP01,这非常有用。
创建类型多租户的Azure机器人资源解决了我的问题。在“配置”下,您可以管理应用程序密码并生成新的秘密。确保将其终生设置为24个月,并记下您未来的自我,以在2年后续签。在Web-Apps应用程序设置中设置
MicrosoftAppid
和MicrosoftappPassword
microsoftappType
toMultitEnant
。无需创建一个密钥库和身份资源(当我创建类型
userAssignedmsi
的Azure bot资源时,我得到了这2个。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
andMicrosoftAppPassword
in the web-apps app settings andMicrosoftAppType
toMultiTenant
.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
).