How to read secrets from Key Vault without using Service Principle in Python Scripts

We are running Python scripts in Azure Data Factory using Batch Service of Azure Data Factory.
We are reading secrets from key vault using Service Principle for which we need to hardcode the Client Id, Client Secret which has the access to read secret values.
Is there any way to overcome this problem so that there is no requirement of hardcoding the Service Principle.
Can we use Managed Identities in this case?

We tried using Managed Identities and we created a User Managed identity to access the key vault.
The Batch Account and Azure Data Factory has been provided the access to this User Managed Identity.
But we are unable to find the next steps in the same case.

Leave a Comment