There is the article about adding credentials in Azure Data Factory: https://learn.microsoft.com/en-us/azure/data-factory/credentials?tabs=data-factory
Associate the user-assigned managed identity to the data factory instance using Azure portal, SDK, PowerShell, REST API.
I am interested in PowerShell or REST API option, the process need to be automated.
I have found New-AzDataFactoryV2LinkedServiceEncryptedCredential in documentation https://learn.microsoft.com/en-us/powershell/module/az.datafactory/new-azdatafactoryv2linkedserviceencryptedcredential?view=azps-8.1.0 but it doesn’t like what I am looking for.
Does anyone have an example of PowerShell code or REST API endpoints to add credential to Azure Data Factory?
2
Answers
Please follow below reference it has detail explanation about:
Creating credentials in azure data factory using Power shell and REST API.
Reference:
Azure Data Factory Using PowerShell by Dhilasu reddy
Managed identity for Azure Data Factory and Azure Synapse | Microsoft
I cannot see anything yet supported for terraform or for the az cli, however there is a REST API.
https://learn.microsoft.com/en-us/rest/api/datafactory/credential-operations
you can then use this with the az cli rest call e.g.