首页 > 解决方案 > Microsoft 团队连接器。removeUrl 页面未加载

问题描述

当我设置 may 连接器时,我调用了 microsoftTeams.settings.setSettings:

            microsoftTeams.settings.setSettings({
                entityId: "MyConnector002",
                contentUrl: `https://msteams.whatever.com/connectorsetup.html`,
                removeUrl: `https://msteams.whatever.com/connectorremove.html`,
                configName: 'Active'
            });

我知道设置是在正确的时间被调用的,因为 contentUrl 页面应该在它应该出现的时候出现。但是,当我单击“配置”列表(“管理”按钮)中的“删除”按钮时,没有加载我的 connectorremove.html 页面。连接器确实删除了,但我配置的 removeUrl 处的页面未加载。

我在connectorremove.html 页面的顶部设置了console.log、alert 和debugger 语句,它们永远不会被命中。所以很明显我对 microsoftTeams.settings.registerOnRemoveHandler 的调用没有被击中。如果我只是将 removeUrl 复制并粘贴到浏览器地址字段中,它可以正常加载。

标签: microsoft-teamsconnector

解决方案


我发现我做错了什么。在“管理”/“已配置”列表中选择连接器的用例中,不应该加载 removeUrl 页面,单击“1 个已配置”,然后单击“管理”按钮。这将打开您在设置的 contentUrl 中指定的页面。您单击该页面底部的“删除”按钮,而不是涉及 removeUrl,它期望在 contentUrl 页面中您已使用 settings.registerRemoveHandler 函数设置了删除处理程序函数。


推荐阅读