我正在使用ARM模板部署Azure Data Factory
。我需要在部署的输出中使用数据工厂的ObjectId/PricipalId/Managed Identity Object ID
。这可以在数据工厂的Properties
选项卡下的Azure门户上找到
我尝试过这些变化,但无济于事:
"value": "[reference(concat('Microsoft.DataFactory/factories/', variables('name')), '2018-06-01').identity.principalId]"
"value": "[reference(concat('Microsoft.DataFactory/factories/', variables('name')), '2018-06-01').principalId]"
我在使用它们时看到的错误是属性(identity / principalId)不存在
我也尝试了文档中提到的东西:https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-functions-resource#reference,它给出了同样的错误
尝试使用reference(concat('Microsoft.DataFactory/factories/', variables('name')), '2018-06-01', 'Full')
作为输出的值并检查它,你应该看看你需要什么。如果是的话 - 像往常一样引用它,如果它没有 - 你运气不好。
工作输出片段是:
"dataFactoryPrincipalId": {
"type": "string",
"value": "[reference(concat('Microsoft.DataFactory/factories/', parameters('name')), '2018-06-01', 'Full').identity.principalId]"
}
请注意,这与“托管身份应用程序ID”属性不同