'How to use Azure Key Vault in SQL Server stored procedures

I would like to retrieve the password I saved in AKV and use it on my stored procedure. Is this possible?



Solution 1:[1]

You can use system-assigned managed identity for your Azure SQL server to access secrets in your Azure Key Vault

Enable System-Assigned managed identity for your Azure SQL server

Add access policy in your Azure Key vault for the Azure SQL server managed identity with GET permissions on secrets

Now, you can use System-Assigned identity on your Azure SQL server to retrieve Azure Key Vault secrets

To use managed identities to connect to your Azure SQL Database, you need to enable Azure Active Directory (AD) authentication and create the managed users in the database

Reference: How to Use Managed Identities with Azure SQL Database | Pluralsight

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 RamaraoAdapa-MT