Search code examples
azureazure-logic-appsazure-management-api

How to give app permission to create Azure Logic App


I am trying to use Microsoft.Azure.Management.Logic.LogicManagementClient to programmatically create a Logic App workflow in Azure. Authentication has already worked, but when I call logicManagementClient.Workflows.CreateOrUpdateAsync(), I am getting a CloudException saying that the client does not have authorization to perform action 'Microsoft.Logic/workflows/write'.

How can I give the app the required permissions?

I have already given it (in the Azure Portal) all permissions for Azure AD and Microsoft Graph. But when I try to add permissions for Windows Azure Service Management API (which I assume is the relevant API here), it says "No application permissions available":

enter image description here


Solution

  • You need to give your app at least Contributor access to the resource group via the Access Control (IAM) tab. To manage Azure resources through the ARM API, you always need a role via RBAC.