User assigned managed identity with credentials ARM deployment of Data Factory using DevOps

Copper Contributor

I am trying to deploy Credentials associated with User assigned managed identity to higher environment via DevOps and ARM templates.

 

I get the error: User assigned identity does not belong to the resource you are deploying to

 

I want to parametrize the User assigned managed identity resource id which is there in the Credentials

 

I added:

 

 

"Microsoft.DataFactory/factories/credentials": { "properties": { "typeProperties": { "resourceid": "=" } } } 

 


to my ARM template definition json in Data Factory, 

I am still not getting the User assigned managed identity resource id as a parameter in the ARM file I exported.

Currently Data Factory is Generating & Exporting the ARM template for Credentials as:

 

CURRENT SCENARIO

 

{ "name": "[concat(parameters('factoryName'), '/<factoryname>')]", "type": "Microsoft.DataFactory/factories/credentials", "apiVersion": "2018-06-01", "properties": { "type": "ManagedIdentity", "typeProperties": { "resourceId": "/subscriptions/<subscriptionid>/resourcegroups/<resource group name>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<managed identity name>" } }, "dependsOn": [] }

 

 

EXPECTED SCENARIO

 

{ "name": "[concat(parameters('factoryName'), '/<factoryname>')]", "type": "Microsoft.DataFactory/factories/credentials", "apiVersion": "2018-06-01", "properties": { "type": "ManagedIdentity", "typeProperties": { "resourceId": [parameters('<parameter Name>')]" } }, "dependsOn": [] } 

 

 

Can Anyone please guide me what is to be changed in the ARM template Definition for the expected scenario?

 

0 Replies