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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
smpa01
Community Champion
Community Champion

Progrmatically get NB path/directory

Is it possible to retrieve progrmatically the current path/directory of the notebook; the following does not return the desired

 

notebookutils.notebook.get('NB1')

 

 


========================
Did I answer your question? Mark my post as a solution!
Proud to be a Super User
My Custom Visualization Projects
• Plotting Live Sound: Live Sound
• Beautiful News: Women in Parliament, Energy Mix, Shrinking Armies
• Visual Capitalist: Working Hrs
• Others: Easing Graph, Animated Calendar
MayViz Submissions
• Week 1: View
• Week 2: View
• Week 3: View
========================
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @smpa01,

In fact, this code is used to get the detail information of notebook instead of path/directory.

{'id': 'xxxxxxx',
 'type': 'Notebook',
 'displayName': 'notebook name',
 'description': 'New notebook',
 'workspaceId': 'xxxxxxxx',
 'properties': {}}

You can extract the 'id' and 'workspace id' properties to concatenate the relative path: groups/{workspace id}/synapsenotebooks/{noteboke id}.

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @smpa01,

In fact, this code is used to get the detail information of notebook instead of path/directory.

{'id': 'xxxxxxx',
 'type': 'Notebook',
 'displayName': 'notebook name',
 'description': 'New notebook',
 'workspaceId': 'xxxxxxxx',
 'properties': {}}

You can extract the 'id' and 'workspace id' properties to concatenate the relative path: groups/{workspace id}/synapsenotebooks/{noteboke id}.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
April Fabric Update Carousel

Fabric Monthly Update - April 2026

Check out the April 2026 Fabric update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.