Parametrize authentication method of linked services

Lina Lampel 0 Reputation points Microsoft Employee
2025-12-11T16:18:42.3166667+00:00

Hello,

we have the following set up: We have three data factory instances dev, preview and prod. Dev is connected to our repository. Preview and Prod are not. For all three instances, we have a linked service X which uses a system assigned identity (SAI) as an authentication method.

We now want to create a forth ADF instance, called dev2 with the same pipelines etc. however for the linked service X (Kusto cluster) we now want to use a user assigned identity (UAI). The new instance dev2 is also connected to the same repository as the existing instance dev.

How can we achieve parametrizing the authentication method for the linked service X such that one of the instances uses an UAI and the other uses an SAI?

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

1 answer

Sort by: Most helpful
  1. Manoj Kumar Boyini 1,660 Reputation points Microsoft External Staff Moderator
    2025-12-11T16:35:17.0766667+00:00

    Hi Lina Lampel,

    It sounds like you're trying to configure a new Azure Data Factory instance (dev2) to use a User Assigned Identity (UAI) for a linked service, while keeping your existing instances (dev, preview, and prod) connected to a System Assigned Identity (SAI). You want to know how to parameterize this authentication method so that you can switch between SAI and UAI based on the instance.

    Here's how you can achieve this:

    Parameterize Your Linked Service:

    • In the Azure Data Factory, open the Linked Services settings for Linked Service X.
      • You’ll want to add parameters for managedIdentity where you can specify whether to use an SAI or a UAI based on the parameters you provide.
      Define Parameters:
      - While defining the linked service JSON, you can add a `parameters` section, where you specify something like:
      
      ```json
      {
      

    "parameters": { "identityType": { "type": "string", "defaultValue": "SAI" } }, "typeProperties": { ... "managedIdentity": { "referenceName": "@{ linkedService().identityType }", "type": "ManagedIdentityReference" } } } ```

            - You would need to replace `linkedService().identityType` with the actual parameter reference.
            
            **Update Pipeline Activity**:
            
               - When you add or reference the linked service in your pipelines, you’ll supply the `identityType` parameter accordingly. For instance, in dev2, you would set it to "UAI", while in the others, you would keep it as "SAI".
               
               **Testing Your Configuration**:
               
                  - After you parameterize the linked service and modify your pipelines, run a test to ensure everything works as expected.
                  
                  **Important Notes**:
                  
                     - Make sure to manage permissions correctly for both UAI and SAI, ensuring that the data factory has the necessary roles assigned to these identities to access the resources needed.
                     
    

    This setup allows you to dynamically switch between different identity types depending on which Data Factory instance is running.

    Additional Resources:

    Hope this helps! If you have any other questions or need further clarification, feel free to ask!


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.