Getting secret from Key Vault of previous version
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2023 03:31 AM
Hi,
I have added secrets in Azure Key Vault and also updated it few times. I need to access current as well as previous version secret in a data pipeline.
dbutils.secrete.get(KeyName, SecretScopeName)This gives me the current version of secret.
How can I access previous version secret using dbutils command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 05:28 AM
Hi @Retired_mod ,
I tried executing following code:
SecreteScopeName = 'SecretScope'
KeyName = 'Key123'
version = '123456789abcdefghijklmn'
val = dbutils.secrets.get(SecreteScopeName, key=KeyName + version)It is giving me the below error:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 02:59 AM
Hi @Retired_mod, @Data_Analytics1
Has a solution this problem been found in the meantime?
I need to access a secret with a SPECIFIC VERSION from Azure Key Vault via Databricks Secret Scope. Hence while retrieving the secret I need to pass BOTH AKV secret name AND AKV secret version. I want to use a function such as
dbutils.secrets.get(scope="my-scope", key="my-key")Concatenating name and version and passing it into the function does not work.
Best,
John.