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.
Showing results for 
Search instead for 
Did you mean: 

Secrets in databricks

Contributor II

I created a secret on databricks using the secrets API.

Code :

Scope_name : {"scope": "dbtest", "initial_manage_principal":"user"}

Similar way, I added the user and password


Content = {"scope":"dbtest","key":"user","string_value":"Vidyasekar"}'', json=content)

After the execution I got response : 

<Response [200]>

Which means secrets stored successfully.

While listing the same using the list API call or 


, its shows 'Secret does not exist with scope

Here my doubt is, How to get the databricks intance name? Where the secrets stored in the DBFS location?


Honored Contributor II
Honored Contributor II

You'll have to specify the scope and the key in the format below to get the value.

dbutils.secret.get(scope="dbtest", key="user") 

Probably a good idea to review the Secret Management documentation for details on how to get this setup the right way -

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!