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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.