如何使用从Web解决方案为Microsoft Teams加载的配置创建连接器 [英] How to create a Connector with configuration loaded from web solution for Microsoft Teams

查看:462
本文介绍了如何使用从Web解决方案为Microsoft Teams加载的配置创建连接器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为Microsoft Teams创建连接器. 我已经在连接器开发人员仪表板中完成了注册,并下载了manifest.json.

I am trying to create a connector for Microsoft Teams. I have completed the registration in the connectors developer dashboard and downloaded the manifest.json.

我能够在Teams中横向加载连接器清单,也可以在连接器列表中找到连接器.

I am able to sideload the connector manifest in Teams and also find the connector in the list of connectors.

当我选择连接器并进行配置时,我输入的所有数据都会正确显示.

When I select the connector and want to configure it, all data I have entererd is shown correctly.

我的问题是-我想让连接器的用户根据其在我网站上的订阅来选择配置参数(例如Trello连接器中的).

My problem is - I want to let the user of the connector select configuration parameters depending on their subscription on my site (like in the Trello connector).

例如,用户在我的网站上的订阅中创建了多个区域.我想让他们选择他想从Microsoft Teams对话中获取更新的区域之一.

For example, the user has created several areas in his subscription on my website. I want to let them select one of the regions from which he wants to get updates in a Microsoft Teams conversation.

从文档中,我无法找到将配置参数从我的网站加载到连接器配置对话框中的位置或方式. 我的清单是这样的(替换了URL和ID)

From the documentation, I am not able to find where or how to load the configuration parameters from my website into the connector configuration dialog. My manifest looks like this (URLs and IDs replaced)

 {
  "$schema": "https://statics.teams.microsoft.com/sdk/v1.0/manifest/MicrosoftTeams.schema.json",
  "manifestVersion": "1.0",
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "version": "1.0",
  "packageName": "com.example.org",
  "developer": {
    "name": "Developer Company",
    "websiteUrl": "https://www.example.com",
    "privacyUrl": "https://www.example.com",
    "termsOfUseUrl": "https://www.example.com"
  },
  "description": {
    "full": "The connector sends notifications ....",
    "short": "Lorem ipsum dolor sit amet"
  },
  "icons": {
    "outline": "https://outlook.office.com/connectors/Content/Images/IncomingWebhook.jpg",
    "color": "https://outlook.office.com/connectors/Content/Images/IncomingWebhook.jpg"
  },
   "configurableTabs": [
        {
            "configurationUrl": "https://teamsnodesample.azurewebsites.net/tabs/configure",
            "canUpdateConfiguration": true,
            "scopes": [
                "team"
            ]
        }
    ],
  "connectors": [
    {
      "connectorId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "scopes": [
        "team"
      ]
    }
  ],
  "name": {
    "full": "My Organisation",
    "short": "My Organisation"
  },
  "accentColor": "#FFFFFF",
  "needsIdentity": "true"
}

trello连接器配置的用户体验如下图所示.我不知道如何集成连接器配置的所有对话框.

The user experience of the trello connector configuration looks like illustrated in the following screenshots. I can't figure out how to integrate all the dialogs of the connector configuration.

推荐答案

1)一旦在连接器开发人员信息中心中注册了连接器并为组或团队的用户设置了着陆页正确重定向URL (例如,正在运行的服务的ngrok端点),Microsoft团队旁边可以选择复制代码并下载清单.我看到您已经使用清单来减轻团队负担.复制代码提供了一个链接,您可以在代码内部的着陆页html中使用该链接.

1) Once you register a connector in connector developer dashboard and set the Landing page for your users for Groups or Teams and Redirect URLs properly(for e.g. ngrok end point of your service running), there is an option next to Microsoft teams to copy code and download Manifest. I see you have used the manifest to sideload in the teams. The copy code gives a link which you can use in Landing page html inside your code.

2)单击连接器旁边的配置,它将弹出一个窗口,其中显示访问要安装的站点-> .这将带您到在门户网站上注册连接器时指定的着陆页.如果您已将代码放在提单页面中,则应该可以看到一个连接到office365连接器的按钮.当您单击它时,它将带您到重定向URL.您应该能够调用您的api并向用户显示任何配置经验.

2) Click on configure next to your connector and it will pop up a window which shows visit site to install -> . This should take you to the Landing page specified while registering the connector on the portal. If you have put the code in lading page then you should be able to see a button connect to office365 connector. When you click on it it will take you to the redirect URL. You should be able to call your api's and display any configuration experience to the user.

此代码示例也可能有用: https://github.com/OfficeDev/microsoft-teams-sample-get-started/tree/master/Node/connector

Also this code sample might be useful : https://github.com/OfficeDev/microsoft-teams-sample-get-started/tree/master/Node/connector

这篇关于如何使用从Web解决方案为Microsoft Teams加载的配置创建连接器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆