Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
PedroJunqueira
Frequent Visitor

Handling secrets in Fabric Notebooks

Hi All,

 

Has anyone know how to deal with secrets, tokens in notebook. 

 

I Python usual practive is to have the token as a enviroment variable in a .env file so I do not need to expose the secret in the notebook.

 

Any ideas?

 

Regards

 

Pedro

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @PedroJunqueira ,

Thanks for using Fabric Community.

Just adding some additional reference to @AndyDDC comment inorder to get some better understanding - Read Secrets From Azure Key Vault in Microsoft Fabric Notebooks (youtube.com)

We haven’t heard from you on the last response and was just checking back to see if we answered your query.
Otherwise, will respond back with the more details and we will try to help .

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Can we access secrets in a key vault without knowing secret name using fabric notebook?

AndyDDC
Super User
Super User

Hi @PedroJunqueira you could use Azure Key Vault to store secrets in and then access via Notebooks.  There's a full rundown of the process here:

 

https://iterationinsights.com/article/microsoft-fabric-notebooks-and-azure-key-vault/

  • I think this approach is working because access was given to the user itself. App registration process seems redundant to me. I think problem will arise again if you will put the notebook on schedule/pipeline.
Anonymous
Not applicable

Hello @PedroJunqueira ,

Thanks for using Fabric Community.

Just adding some additional reference to @AndyDDC comment inorder to get some better understanding - Read Secrets From Azure Key Vault in Microsoft Fabric Notebooks (youtube.com)

We haven’t heard from you on the last response and was just checking back to see if we answered your query.
Otherwise, will respond back with the more details and we will try to help .

Anonymous
Not applicable

Any related links on how to update a secret via Fabric Notebooks? 

Hi @Anonymous Here you can see the process to update the secret from notebook https://iterationinsights.com/article/microsoft-fabric-notebooks-and-azure-key-vault/

 

Although I n this article, app registration process seems redundant to me.

Hi @Anonymous 

 

Also there is this video here 😉https://www.youtube.com/watch?v=alZWTehsTcg

 

Thanks

 

Pedro 

Anonymous
Not applicable

Hi @PedroJunqueira ,

Glad to know that your issue got resolved. Please continue using Fabric Community on your further queries.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

JanFabricDE_carousel

Fabric Monthly Update - January 2025

Explore the power of Python Notebooks in Fabric!

JanFabricDW_carousel

Fabric Monthly Update - January 2025

Unlock the latest Fabric Data Warehouse upgrades!

JanFabricDF_carousel

Fabric Monthly Update - January 2025

Take your data replication to the next level with Fabric's latest updates!