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

Get Fabric certified for FREE! Don't miss your chance! Learn more

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: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Fabric Update Carousel

Fabric Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors