ARM template for Data Factory connector in Logic Apps with Managed Identity

Viewed 73

I have a Logic App that uses the Azure Data Factory action "Create a pipeline run" that works perfectly.

This is how the Logic App looks like

The authentication method to Azure Data Factory that I use is "System assigned" managed identity.

After creating and testing the Logic App, I now want to create an ARM template to save it in the code repository for deployment, however I'm struggling to get the authentication part of the ARM template to work. I'm not sure how the syntax should be and I don't find anything in the Microsoft documentation.

In the Logic App resource I have added:

  "identity": {
    "type": "SystemAssigned"
  }

This is how the connections part of the Logic app resource looks like:

      "$connections": {
        "value": {
          "azuredatafactory": {
            "connectionId": "[parameters('connections_azuredatafactory_externalid')]",
            "connectionName": "[parameters('connections_azuredatafactory_name')]",
            "connectionProperties": {
              "authentication": {
                "type": "ManagedServiceIdentity"
              }
            },
            "id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/francecentral/managedApis/azuredatafactory')]"
          }
        }
      }

And this is how the connection resource look like (I think I'm missing something here (?)):

{
  "type": "Microsoft.Web/connections",
  "apiVersion": "2016-06-01",
  "name": "[parameters('connections_azuredatafactory_name')]",
  "location": "francecentral",
  "kind": "V1",
  "properties": {
    "displayName": "[parameters('connections_azuredatafactory_displayname')]",
    "alternativeParameterValues": {},
    "parameterValueSet": {
      "name": "managedIdentityAuth",
      "values": {}
    },
    "statuses": [
      {
        "status": "Ready"
      }
    ],
    "api": {
      "id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/francecentral/managedApis/azuredatafactory')]"
    }
  }
}

The error message I get when trying to deploy this through Visual studio 2022 is:

Template deployment returned the following errors: Resource Microsoft.Logic/workflows 'logic-d365-dwh-01-ip-dev-rxlse' failed with message '{ "error": { "code": "WorkflowManagedIdentityConfigurationInvalid", "message": "The workflow connection parameter 'azuredatafactory' is not valid. The API connection 'azuredatafactory' is not configured to support managed identity." } }'

Anyone who knows what the problem could be?

0 Answers
Related