1

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.

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.

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).

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.

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"
}

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.

Screen 1

Screen 2

Screen 3

Screen 4

Screen 5

4

1 回答 1

1

1) 一旦您在连接器开发人员仪表板中注册连接器并为您的用户设置组或团队的登录页面并正确重定向 URL(例如,您的服务运行的 ngrok 端点),Microsoft 团队旁边有一个选项可以复制代码并下载清单。我看到您已使用清单在团队中进行侧载。复制代码提供了一个链接,您可以在代码中的着陆页 html 中使用该链接。

2) 单击连接器旁边的配置,它将弹出一个窗口,显示要安装的访问站点 ->。这应该会将您带到在门户上注册连接器时指定的登录页面。如果您已将代码放入到装货页中,那么您应该能够看到连接到 office365 连接器的按钮。当您单击它时,它将带您到重定向 URL。您应该能够调用您的 api 并向用户显示任何配置体验。

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

于 2017-08-28T18:50:29.110 回答