Parametrize linked service

Lina Lampel 0 Reputation points Microsoft Employee
2025-12-12T11:41:11.1066667+00:00

Our issue spans over multiple factories as we need a way to parametrize the authentication method for both using user managed (UMI) and systems managed identities (SMI) as well as using different credentials for the respective UMIs. The linked service we use is of type AzureDataExplorer.

Ideally we would like to have the following architecture:

  • factory_1 (connected to repo) using linkedService X with SMI_1
  • factory_2 (NOT connected to repo) using linkedService X with SMI_2
  • factory_3 (connected to repo) using linkedService X with UMI_1
  • factory_4 (connected to repo) using linkedService X with UMI_2
  • factory_5 (NOT connected to repo) using linkedService X with UMI_3

All of the above factories should be based on the same repository either with a direct connection to it or we deploy to them using templates but still using the same repository. Currently we have setup factories_1 and _2 using SMIs and they are working fine but we are having trouble setting up the remaining factories because we cannot manage to parametrize the authentication method of service X.

The question is whether such a setup is even possible in ADF and if so, how would we achieve this parametrization, i.e. what would the linked Service JSON look like? We would ideally like to achieve this set up using global parameters as we do not need to specify a different authentication method per pipeline but just per factory.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2025-12-12T11:41:29.3566667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Yes, it is possible to set up parameterization for linked services in Azure Data Factory (ADF) to accommodate different authentication methods, including both user-managed identities (UMI) and system-managed identities (SMI). You can achieve this by defining parameters in your linked service JSON that specify the authentication method and the corresponding credentials.

    Here’s a general approach to how you can structure your linked service JSON to support this setup:

    1. Define Parameters: You will need to define parameters in your linked service that can accept values for the authentication method and the identity to use.
    2. Linked Service JSON Example:
         {
           "name": "linkedServiceX",
           "type": "AzureSqlDatabase",
           "typeProperties": {
             "connectionString": "<your_connection_string>",
             "connectVia": {
               "referenceName": "<integration_runtime_name>",
               "type": "IntegrationRuntimeReference"
             },
             "authenticationType": "@{parameters.authenticationType}",
             "userAssignedManagedIdentityId": "@{parameters.userAssignedManagedIdentityId}",
             "systemAssignedManagedIdentity": "@{parameters.systemAssignedManagedIdentity}"
           },
           "parameters": {
             "authenticationType": {
               "type": "String"
             },
             "userAssignedManagedIdentityId": {
               "type": "String"
             },
             "systemAssignedManagedIdentity": {
               "type": "Boolean"
             }
           }
         }
      
      In this example, authenticationType can be set to either SMI or UMI, and you can pass the respective identity ID based on the factory's requirements.
    3. Deployment: When deploying your factories, you can pass different values for these parameters based on the factory's configuration, allowing you to use the same linked service definition across multiple factories while adapting to their specific authentication needs.

    By following this approach, you can manage the authentication methods dynamically based on the factory's requirements, whether they are connected to a repository or not.


    References:


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.