Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I've experienced an error while running the following command:
Get-PowerBITable -DatasetId [My Dataset ID Here] -WorkspaceId [My Workspace ID here] . Error is as follows:
Get-PowerBITable : Operation returned an invalid status code 'NotFound'
At C:\Powershell Tests\Test.ps1:6 char:1
+ Get-PowerBITable -DatasetId ..... -Wor ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...GetPowerBITable:GetPowerBITable) [Get-PowerBITable], HttpOperationException
+ FullyQualifiedErrorId : Operation returned an invalid status code 'NotFound',Microsoft.PowerBI.Commands.Data.GetPowerBITable
Please kindly assist.
Regards,
Joe
I have a same error when I am running Get-PowerBITable -DatasetId or Invoke-PowerBIRestMethod -Url 'datasets/{datasetId}/tables' -Method Get but I am able to run other admin command
The command Get-PowerBITable is actually calling the REST API to get list of tables
Unfortunatly this only possible for push datasets at the moment
Check this link
https://docs.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-get-tables
This is answer!
I am having the same problem, I am a Power BI Admin, when I execute the following command in powershell
Get-PowerBIDataset -Scope Organization | Get-PowerBITable
I get "Get-PowerBITable: Operation returned an invalid status code 'NotFound'"
No, I was not able to find any solutions on that.
Hi @Anonymous
As the error mentioned the Script couldn't able to find it the one which you are looking
Possible reason:
~Jay
Pls join my upcoming webinar
Hi Jayendran,
It is strange, because I am setup as the Power BI Service Admin of our tenant.
I am confident that my datasetid/workspace id are correct (I got it by reading from url or running Get-PowerBIDataset -Scope Organization)
I am able to run the following and get data without issues:
Get-PowerBIDataset -Scope Organization
Get-PowerBIWorkspace -All
By removing the workspace id, error is : Get-PowerBITable : Operation returned an invalid status code 'Forbidden'.
Really need help from someone to understand what is happening.
Regards,
Joe
Hi @Anonymous ,
Ah now it's Forbidden error which means like you are not allowed. Can you try the same script in a new powershell session or window
Seeing the same behaviour here - did you ever find a solution?