Forum Discussion
DatasetNotFoundException: Notebook cannot detect dataset even though it exists in the same workspace
Hi SreeAravindM , Thank you for reaching out to the Microsoft Community Forum.
This usually happens when the notebook is resolving a different workspace than the one that actually contains the dataset. SemPy relies on the workspace of the attached lakehouse or the notebook’s own workspace and if that doesn’t match where the semantic model lives, fabric.list_datasets() simply comes back empty.
Another common cause is the identity the notebook is running under. Service principal or restricted tokens can access items like lakehouses but still be unable to list semantic models. When you switch to an interactive user token or give that identity Viewer/Admin access on the semantic model, the same call starts returning the dataset.
Roles in workspaces in Microsoft Fabric - Microsoft Fabric | Microsoft Learn
Actually, both the notebook and the semantic model (dataset) are in the same workspace.
I have workspace admin permission. Do we need to add any additional permissions
- v-hashadapu11 months ago
Community Support
Hi SreeAravindM , Thank you for reaching out to the Microsoft Community Forum.
If the notebook and the semantic model are in the same workspace and you already have Workspace Admin, you don’t need any additional permissions. In most cases where fabric.list_datasets() returns empty, the issue is how the notebook is authenticated. When a notebook runs under a service principal or another restricted token, it can access items like lakehouses but still fail to enumerate semantic models, even with workspace admin rights. Running the notebook with an interactive user token or giving the identity used by the notebook explicit Viewer/Build access on the semantic model, usually makes the dataset show up immediately.
If you’ve confirmed the workspace is correct and you’re already using an interactive user identity with normal rights, then the problem is likely a backend/SDK issue rather than a permissions one. In that case, I suggest opening a Microsoft Support ticket.
Below is the link to help create Microsoft Support ticket:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft LearnAlso, please refer:
Service Principal support for Semantic Link - Microsoft Fabric | Microsoft Learn