'Azure Devops with Data Factory - ##[error]Access to the path 'D:\a\r1\a\_myDrop\drop' is denied

I am creating a release pipeline. As per Microsoft documentation, I am using their pre and post deployment powershell script.

On creating the Azure PowerShell task, I created an "Azure Service Connection" with creator permissions on the destination resource group.

I am now getting the following error when the PowerShell script task is run in the pipeline:

##[error]Access to the path 'D:\a\r1\a\_myDrop\drop' is denied

enter image description here

I am unsure what additional permissions may be required and would appreciate any expertise.



Solution 1:[1]

Consider below Unsupported features

• By design, Data Factory doesn't allow cherry-picking of commits or selective publishing of resources. Publishes will include all changes made in the data factory.

  • Data factory entities depend on each other. For example, triggers depend on pipelines, and pipelines depend on datasets and other pipelines. Selective publishing of a subset of resources could lead to unexpected behaviors and errors.

  • On rare occasions when you need selective publishing, consider using a hotfix. For more information, see Hotfix production environment.

• The Azure Data Factory team doesn’t recommend assigning Azure RBAC controls to individual entities (pipelines, datasets, etc.) in a data factory. For example, if a developer has access to a pipeline or a dataset, they should be able to access all pipelines or datasets in the data factory. If you feel that you need to implement many Azure roles within a data factory, look at deploying a second data factory.

• You can't publish from private branches.

• You can't currently host projects on Bitbucket.

• You can't currently export and import alerts and matrices as parameters.

• In the code repository under the adf_publish branch, a folder named 'PartialArmTemplates' is currently added beside the 'linkedTemplates' folder, 'ARMTemplateForFactory.json' and 'ARMTemplateParametersForFactory.json' files as part of publishing with source control.

Refer official doc

Solution 2:[2]

I got the same error when following this tutorial.

I solved that by fixing the armTemplate path argument in the Azure PowerShell script: Pre-Deployment agent job. In my case, it as missing the /ARMTemplateForFactory.json part from the path.

So, instead of

-armTemplate "$(System.DefaultWorkingDirectory)/_Azure Data Factory-CI/drop" -ResourceGroupName $(ResourceGroup) -DataFactoryName $(DataFactory) -predeployment $true -deleteDeployment $false

I used:

-armTemplate "$(System.DefaultWorkingDirectory)/_Azure Data Factory-CI/drop/ARMTemplateForFactory.json" -ResourceGroupName $(ResourceGroup) -DataFactoryName $(DataFactory) -predeployment $true -deleteDeployment $false

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 AbhishekKhandave-MT
Solution 2 Daniel Bonetti