@microsoft/azure-data-factory-utilities: purpose of the factoryId parameter

Bánhidy Attila 40 Reputation points
2026-09-04T07:55:42.2233333+00:00

Hi,

I have recently started using the @microsoft/azure-data-factory-utilities package to generate ARM templates in an Azure DevOps pipeline. It is working, and I am able to generate the ARM templates successfully. :)

However, I have a question about the second mandatory parameter of the validate and export commands. I could not find a clear explanation of its exact purpose in the official documentation.

I am referring to the factoryId parameter, which contains the Azure subscription ID, resource group name, and Data Factory name in the following format:

/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.DataFactory/factories/<factoryName>

My main question is:

During the validation or export process, does the Utilities package use this factoryId to access or retrieve any information from the corresponding Azure Data Factory resource?

For example, does it use the factoryId to retrieve or determine any of the following?

Data Factory configuration or properties

ARM template parameter configuration

arm-template-parameters-definition.json or any equivalent configuration

Environment-specific values

Any other information from the existing Data Factory that affects validation or ARM template generation

Or is the factoryId used only as an identifier/context for the validation and export process, without reading configuration from the actual Data Factory resource in Azure?

The reason I am asking is that we have multiple Data Factory environments in the same Azure subscription, with different resource groups and factory names. It is currently somewhat difficult for us to dynamically determine the correct factoryId in the pipeline.

Therefore, I would like to understand whether using a different but valid Data Factory factoryId could have any impact on the generated ARM template or the validation result.

I hope my question is clear. If any additional information or an example would help, please let me know.

Thank you!

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.


Answer accepted by question author
Vinodh247-1375 44,716 Reputation points Volunteer Moderator
2026-09-04T11:52:19.1466667+00:00

Based on the documented behaviour of @microsoft/azure-data-factory-utilities, the source of truth for validation and ARM template generation is the content in the rootFolder, which contains the ADF artefacts exported from Git. The utility runs the same validation and ARM-template-generation logic used by ADF Studio against those files.

The factoryId parameter primarily provides the data factory resource identity in the format: /subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.DataFactory/factories/<factoryName>

From the public documentation, there is no indication that the utility uses factoryId to retrieve:

  • Existing data factory configuration from azure
  • arm-template-parameters-definition.json
  • Environment-specific settings
  • ARM parameterisation rules from a live factory
  • Other factory metadata that influences template generation

Those artefacts are expected to come from the repository content being validated/exported, not from the target data factory resource.

Therefore, using a different but syntactically valid factoryId should not cause the utility to load or merge configuration from that ADF into the generated ARM template. However, I would still recommend using the correct factory ID because it represents the intended Data Factory context and may be reflected in generated resource identifiers and references.

For CI/CD pipelines, a common approach is to construct the factoryId deterministically from pipeline variables rather than dynamically querying Azure: /subscriptions/$(subscriptionId)/resourceGroups/$(resourceGroup)/providers/Microsoft.DataFactory/factories/$(factoryName)

In short: rootFolder provides the ADF artefacts being validated and exported, while factoryId provides the identity/context. It is not documented as a mechanism for reading configuration from an existing Azure Data Factory.

Help make this community better for everyone: if this answer resolved your issue, please accept it or leave an upvote. If not, share more details in a comment so we can continue the discussion and find the right solution.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

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.