I have two Azure keys vaults. One for password and one for username. I have to insert username value but I don’t know where I have to get it. How have I to insert username Azure key vault in this linked service sql server? this is a screen where I have to insert the username value
I have two Azure keys vaults. One for password and one for username. I have to insert username value but I don’t know where I have to get it. How have I to insert username Azure key vault in this linked service sql server? this is a screen where I have to insert the username value
Share asked Mar 31 at 19:15 GiusyGiusy 11 bronze badge 1- Currently you can only fetch password using Key Vault – Pritam Commented Apr 2 at 4:49
1 Answer
Reset to default 0As you want to insert username from secret stored in Azure Key Vault for SQL Authentication, but that feature is currently not available.
We can only fetch password stored in Azure Key Vault as secret.
But you can surely parameterise your username and try the below method to achieve that:
Add Key Vault Administrator Role to your ADF:
Now create a pipeline, with Web Activity to fetch the username value Reference Microsoft Doc
URL: https://<YOUR-KEYVAULT-NAME>.vault.azure/secrets/<SECRET-NAME>?api-version=7.3
Now, need to create the Azure SQL database Linked Service and parameterise the User name.
Then use this parameter, with this expression in linked Service @{linkedService().user_name}
To fetch the output value (username) from web activity
Now create a dataset which will use this Linked Service and provide the value of parameter using this expression
@activity('<web activity name>').output.value
Then add Lookup Activity which will use the Dataset to build the connection.
Now Debug this pipeline to test the connection.