是否可以设计在安装 Microsoft Teams App 时触发的设置步骤?

Is it possible to design a setup step to be triggered when installing a Microsoft Teams App?

我正在为 Microsoft Teams 应用程序设计架构。

此应用程序是多租户平台的集成,客户可以设置自己的 URL 来访问系统,即:https://app.customer.com/

我想知道是否有一种标准方法可以在应用程序安装上执行一个步骤来设置实例 URL。

我知道我可以设计一个应用程序生成器,驻留在每个客户实例中,然后将 manifest.zip 交付给客户进行安装,但我觉得拥有它我们会失去所有营销和合作机会商店会提供。

我找不到标准方法,所以我设计了一个建议的解决方案并希望与社区一起验证它。

根据我们目前在 Microsoft Teams 文档中看到的内容,我提供了一个问题和变通方法列表,用于针对多个实例使用单个应用程序。

问题 1:应在 manifest.json

上明确设置可访问域

Workaround: have a middleware in a fixed URL that handles all requests made by the app and route to the customer site

问题 2:应用程序安装没有标准步骤来设置实例 URL

Workaround: Design a static tab that would handle the configuration, so in that tab, the admin would need to set up any configuration like instance URL

问题 3:安装后,即使在管理员进行设置以定义要使用的客户实例 URL 之前,用户也可以使用该功能。

Workaround: Make all designed interactions (i.e.: Tabs configuration page, bot response, actions, cards, etc... ) have a response to the user saying there are pending configurations in case the admin did not set the URL yet