cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Can we display key vault secret in Databricks notebook

Shreyash_Gupta
New Contributor III

I am using databricks notebook and Azure key vault.

When I am using below function I am getting as output [REDACTED].

'dbutils.secrets.get(scope_name,secret_name)'
 
I want to know if there is any way to display the secret in databricks.
1 ACCEPTED SOLUTION

Accepted Solutions

daniel_sahal
Esteemed Contributor

@Shreyash_Gupta 
You can simply iterate over each letter of the secret and print it.
Something like this:

for letter in dbutils.secrets.get(scope_name,secret_name):
   print(letter)

View solution in original post

4 REPLIES 4

Walter_C
Databricks Employee
Databricks Employee

In Databricks, secrets retrieved using dbutils.secrets.get(scope_name, secret_name) are intentionally redacted and displayed as [REDACTED] in notebook outputs to ensure sensitive information is not exposed. This behavior is a security feature to prevent accidental exposure of secrets.

If you need to verify the value of a secret, you should do so outside of the notebook environment, such as directly within the Azure Key Vault interface or using the Azure CLI.

I completely understand the security perspective. Just wanted to know if there is any way to do it or not.
Thankyou for your response.

daniel_sahal
Esteemed Contributor

@Shreyash_Gupta 
You can simply iterate over each letter of the secret and print it.
Something like this:

for letter in dbutils.secrets.get(scope_name,secret_name):
   print(letter)

Thanks for this solution @daniel_sahal. It is simple yet effective

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now