首页 > 解决方案 > 使用 MS Teams 作为通道:身份验证对话框(Microsoft.Bot.Builder.Dialogs 中的 GetTokenDialog 类)不会弹出

问题描述

如何将 Bot Builder 中的新身份验证功能与 MS Teams 一起使用?

Teams 似乎存在问题(请参阅使用 MS Teams bot 登录用户https://github.com/Microsoft/BotBuilder/issues/2104),似乎在 GetTokenDialog 中没有考虑到这一点?

有没有机会解决这个问题?

标签: botframeworkazure-bot-service

解决方案


刚刚找到了它不适用于 Teams 的原因。在 Microsoft.Bot.Connector.Activity.CreateOAuthReplyAsync() 方法中,MSTeams 的参数 asSignInCard 必须设置为 True,然后,new CardAction() { Title = buttonLabel, Value = link, Type = ActionTypes.Signin }必须将行更改为,new CardAction() { Title = buttonLabel, Value = link, Type = ActionTypes.OpenUrl }因为 MS Teams 显然无法处理 Action 类型的登录。希望 MS 开发人员能尽快修复该方法。


推荐阅读