用于逻辑应用程序的 ARM 模板 Office 365 连接

Mur*_*oft 8 azure office365 azure-resource-manager azure-logic-apps

我有一个逻辑应用程序,我试图通过 ARM 模板实现自动化。

逻辑应用需要连接到 Office 365。下面是从 Azure 门户的自动化窗格生成的连接模板。

当我运行脚本时,它失败了 - Azure 订阅和 Office 365 订阅之间存在身份验证问题。

链接授权失败

客户端有权在范围内执行操作“Microsoft.Web/locations/managedApis/join/action”……但是当前租户“curr-tenant-guid”无权访问链接订阅“linked-sub-guid” ...

我将无法创建此信任来自动进行配置,但我想将连接创建为占位符,以便可以部署逻辑应用程序,并且我可以返回门户以授权连接。这可能吗?还有其他选择吗?

 {
      "comments": "Office 365 user for file monitoring",
      "type": "Microsoft.Web/connections",
      "name": "MyOffice365User",
      "apiVersion": "2016-06-01",
      "location": "northeurope",
      "scale": null,
      "properties": {
        "displayName": "readuser@example.com",
        "customParameterValues": {},
        "api": {
          "id": "[concat('/subscriptions/a6720ff8-f7cb-4bc8-a542-e7868767686/providers/Microsoft.Web/locations/northeurope/managedApis/', 'MyOffice365User')]"
        }
      },
      "dependsOn": []
    }
Run Code Online (Sandbox Code Playgroud)

Tho*_*mas 4

我发现了三个与同一问题相关的帖子:

所有 API 连接的问题都是相同的。访问特定服务的连接参数存储在 Azure 上,当您尝试导出 ARM 模板时,没有任何与这些特定参数相关的信息(这很有意义,因为 Azure 不会泄露您的秘密、密码……)。

诀窍是查询 Azure 资源管理 API 以返回逻辑应用程序中任何连接所需的参数。

只需按照本文中的说明进行操作即可: