Azure Synapse Analytics: Keyvault Access
Here's what you can do to access sensitive info in a Synapse Workspace notebook
Table of contents
Pre-requisite:
You already have an Azure Keyvault set up, with the secrets defined.
Access Secrets in Synapse Notebook
Provide GET, List permissions for the new Synapse Workspace/ its UAMI under Access Policies in the Key Vault
Create a new linked service for the keyvault in the Synapse Workspace.
Use managed identity as the authentication method, make sure to test the connection!
In the Notebook, use
TokenLibrary.getSecret(<keyVault name>, <secret>, <keyVault LinkedService Name')
to fetch the secret