【问题标题】:Teams Messaging Extensions Config Auth团队消息传递扩展配置身份验证
【发布时间】:2021-01-06 01:29:12
【问题描述】:

我使用示例创建了一个消息扩展,

https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/javascript_nodejs/52.teams-messaging-extensions-search-auth-config

我正在关注此文档进行身份验证,

https://docs.microsoft.com/en-us/microsoftteams/platform/messaging-extensions/how-to/add-authentication#:~:text=If%20your%20service%20requires%20user,can%20use%20the%20messaging%20extension.&text=User%20issues%20a%20query%2C%20or,inspecting%20the%20Teams%20user%20ID.

使用的技术:- Node Js

我面临的问题是,在团队中安装消息扩展时无法打开身份验证网页,它直接打开消息扩展窗口而不是网页。


        // The user has requested the Messaging Extension Configuration page settings url.
        const userSettings = await this.userConfigurationProperty.get(context, '');
        const escapedSettings = userSettings ? querystring.escape(userSettings) : '';

// I am able to reach here, but that url which is returning is not opening.

        return {
            composeExtension: {
                type: 'config',
                suggestedActions: {
                    actions: [
                        {
                            type: ActionTypes.OpenUrl,
                            value: `${process.env.SiteUrl}/public/searchSettings.html?settings=${escapedSettings}`
                        }
                    ]
                }
            }
        };
    }

在清单文件中,我传递了文档中提到的有效 url,但仍然没有打开身份验证页面。

如果您有任何参考资料或与此相关的任何文件,请分享。

谢谢

【问题讨论】:

    标签: azure microsoft-teams


    【解决方案1】:

    这是使用 node.js 并包含 SSO 的消息扩展示例:https://github.com/pnp/teams-dev-samples/tree/master/samples/msgext-graph-action-docreview

    【讨论】:

    • 我和上面的例子一样,我很清楚如何在消息扩展中进行身份验证,谢谢。但是现在我又遇到了另一个错误,当我单击此函数生成的链接时 --> context.adapter.getSignInLink(context, this.connectionName), { "error": { " code": "ServiceError", "message": "获取登录链接时出错" } }
    猜你喜欢
    • 2022-11-04
    • 1970-01-01
    • 1970-01-01
    • 2020-05-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-27
    相关资源
    最近更新 更多