Forum Discussion
powerbi get datasets api is missing some datasets
- 1 year ago
Hi ledd_25 ,
Get-PowerBIDataset and GetDatasetsAsAdmin only return datasets that the calling user has access to. If you don’t have at least viewer permissions on a workspace, its datasets will not appear in your query result--even if they exist and are active.So, probably you are missing a permission to access the dataset.
You can follow the checks provided by Nasif_Azam and this might help you troubleshoot the issue.
Hope this helps!
Hey ledd_25 ,
The discrepancy you are seeing is likely due to workspace access limitations.
Try Recommended Actions:
Use Get-PowerBIDataset -Scope Organization or GetDatasetsAsAdmin only if you’re a Power BI Admin they return the broadest dataset list you're authorized to see.
For datasets that still don’t appear, check:
If they’re in classic workspaces (not supported).
If sensitivity labels or policies limit visibility.
If the dataset was deleted or unpublished after the log entry was captured.
If you truly need a complete inventory of all datasets, you’ll need:
Power BI Admin role.
To use Service Principal with tenant-wide permissions, and ensure it's approved for the required workspaces.
Alternatively, use Graph API or Admin APIs from a privileged account.
For Detailed Information:
Get-PowerBIDataset (Microsoft Docs)
GetDatasetsAsAdmin (REST API) – Microsoft Docs
PowerBIActivityEvent Reference – Microsoft Docs
Workspace types in Power BI – Classic vs. New
Admin APIs and Permissions in Power BI
Service Principal Authentication for Admin APIs
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam
There are some datasets that i cant find but their workspaces i can find using Get-PowerBIWorkspace. And upon checking there are a lot of datasets using Get-PowerBIDataset that i can find but their workspaces i dont have access to. So even on both datasets that i can and cant find, a lot of their workspaces i dont have access to. Is this to be expected? what made some datasets visible when i also dont have access to their workspace?