Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

azure - ARM template Office 365 connection for logic apps

I have a logic app that I am trying to automate through an ARM Template.

The logic app requires a connection to Office 365. Below I have the template for the connection generated from the automation pane of the Azure Portal.

When I run the script it fails - there is an authentication issue between the Azure subscription and the Office 365 subscription.

LinkedAuthorizationFailed

The client has permission to perform action 'Microsoft.Web/locations/managedApis/join/action' on scope ... however the current tenant 'curr-tenant-guid' is not authorized to access linked subscription 'linked-sub-guid' ...

I wont be able to create this trust to automate the provisioning, but I would like to create the connection as placeholder so that the logic app can be deployed and I can go back to the portal to authorise the connection. Is this possible? Are there any other alternatives?

 {
      "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": []
    }
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I found three post related to the same problem:

The problem is the same for all API Connection. Connection parameters to access the specific service are stored on Azure and when you try to export the ARM Template there is nothing regarding these specific parameters (which make sens as Azure will not expose your secret, password...).

The trick is to query Azure Resource Management API to return the parameters needed for any connection in a Logic App.

Just follow the instructions on this article:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...