Search code examples
azure-synapseazure-synapse-link

How to get the KeyVault name in the notebook from the keyvault link in Synapse?


How to get the KeyVault name in the notebook from the keyvault link in Synapse?

I need the KeyVault name to pass to the TokenLibrary.

TokenLibrary.getSecret(keyVaultName,"MyConnectionString", "AzureKeyVaultLink")


Solution

  • I found a solution to get the secret without the key vault name. There is an API called

    Token.getSecretWithLS("AzureKeyVaultLink", "MyConnectionString"));
    

    which will get the secret from the KV.