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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Aaronasp
Regular Visitor

Get-PowerBIDataSet Error

The below the lines of code are part of one of my powershell scripts and it was working until this week when I starter to get an error (see below):

Code:

$datasetName = (Get-PowerBIdataset -Id $datasetID -Scope Organization).Name
if ( [string]::IsNullOrEmpty($datasetName)){
write-host "UNKNOWN - Could not find the requested dataset!"
exit 3
}

 

Error:

Get-PowerBIdataset : A task was canceled.
At E:\PowerBI\scripts\nagios-check-refresh.ps1:131 char:17
+ ... asetName = (Get-PowerBIdataset -Id $datasetID -Scope Organization).Na ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...tPowerBIDataset:GetPowerBIDataset) [Get-PowerBIDataset], TaskCanceledException
+ FullyQualifiedErrorId : A task was canceled.,Microsoft.PowerBI.Commands.Data.GetPowerBIDataset

 

I tried a lot of ways to avoid this but the Get-PowerBIDataSet is not returning any value when I pass the $datasetid and I confirmed it's valid and the user is an admin.

Not sure if this is related to the update on the Power BI to the dataset that are not longer called in that way but Semantic Model, please advise about any possible solution.

4 REPLIES 4
Aaronasp
Regular Visitor

I tried to get the name of the dataset using the datasetID in this line:

 

$datasetName = (Get-PowerBIdataset -Id $datasetID -Scope Organization).Name

 

but apparently the Get-PwerBIdataset is not working anymore because is returning the error I posted above, no matter how I change that never return the value and that was working just fine until this week.

Anonymous
Not applicable

HI @Aaronasp,

Have many times you test with these API? AFAIK, current tenant/capacity existed limitation process the request and they will block/cancelled if too many requests sent.
In addition, how long did this request processed? If the current request execute too long times power bi service will also cancel the request.

Regards,

Xiaoxin Sheng

how this can be a solution, this is a joke, nothing that you mentioned make any sense, there is no limitation on nothing, I found a work around that but stop posting things that doesn't help at all, thanks for nothing

Anonymous
Not applicable

Hi @Aaronasp ,

Can you please share some more detail information about this issue? They should help us clarify your scenario and test to troubleshoot.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.