How to Parameterize Fabric Linked Services in Azure Data Factory for Azure Devops Deployment

Quite the title, so let me set the stage first. You have an Azure Data Factory instance (or Azure Synapse Pipelines) and you have a couple of linked services that point to Fabric artifacts such as a lakehouse or a warehouse. You want to deploy your ADF instance with an Azure Devops build/release pipeline to another environment (e.g. acceptance or production) and this means the linked services need to change as well because in those environments the lakehouse or warehouse are in a different workspace (and also have different object Ids).

When you want to deploy ADF, you typically use the ARM template that ADF automatically creates when you publish (when your instance is linked with a git repo). More information about this setup can be found in the documentation. To parameterize certain properties of a linked service, you can use custom parameterization of the ARM template. Anyway, long story short, I tried to parameterize the properties of the Fabric linked service. When you look at the JSON of such a linked service, it looks like this:

{
    "name": "my_fabric_lakehouse_linkedservice",
    "type": "Microsoft.DataFactory/factories/linkedservices",
    "properties": {
        "type": "Lakehouse",
        "typeProperties": {
            "workspaceId": "someId",
            "artifactId": "anotherId",
            "tenant": "yetAnotherId",
            "servicePrincipalId": "moreId",
            "servicePrincipalCredentialType": "ServicePrincipalKey",
            "servicePrincipalCredential": {
                "type": "AzureKeyVaultSecret",
                "store": {
                    "referenceName": "my_keyvault",
                    "type": "LinkedServiceReference"
                },
                "secretName": "service-principal-secret"
            }
        },
        "annotations": []
    }
}

In this case, authentication is done using a service principal and its secret is stored in an Azure Key Vault (for which there’s also a linked service configured). We’re interested in parameterizing the workspaceId, the artifactId and the servicePrincipalId properties. So I added the following piece of JSON to the arm-template-parameters-definition.json file:

    "Microsoft.DataFactory/factories/linkedservices": {
     "*": {
            "properties": {
                "typeProperties": {
                    "workspaceId": "=",
                    "artifactId" : "=",
                    "servicePrincipalId": "="
                }
            }
        }
    }

However, none of those properties were added to the ARMTemplateParametersForFactory.json file in the adf_publish branch. Turns out, the actual JSON in ADF uses Microsoft.DataFactory/factories/linkedservices, while the JSON in the custom parameterization needs to use Microsoft.DataFactory/factories/linkedServices (with a capital S). When I made this little change, the properties were finally added to the ARM parameters file and I could overwrite them in the Azure Devops pipeline:


------------------------------------------------
Do you like this blog post? You can thank me by buying me a beer 🙂
Koen Verbeeck

Koen Verbeeck is a Microsoft Business Intelligence consultant at AE, helping clients to get insight in their data. Koen has a comprehensive knowledge of the SQL Server BI stack, with a particular love for Integration Services. He's also a speaker at various conferences.

Recent Posts

dataMinds Saturday 2026 – Slides

At Saturday the 21st of February I'm presenting an introduction to dimensional modelling at dataMinds…

2 weeks ago

SSMS 22 still inserting tabs instead of spaces

I'm not trying to start up a debate whether you should use tabs or spaces…

1 month ago

Power BI PBIR Format Admin Setting

The Power BI Enhanced Report Format (PBIR) will soon become the default, and that's a…

4 months ago

Logged in as a member of an Azure AD Group Error while Deploying DACPAC

Quite a long title for a short blog post :)While deploying a DACPAC (from a…

4 months ago

Export a Power BI Report that cannot be Downloaded

Yes, you're reading that right, we're going to download a report that cannot be downloaded.…

4 months ago

dataMinds Connect 2025 – Slides & Scripts

You can find all the session materials for the presentation "Indexing for Dummies" that was…

5 months ago