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
po
Post Prodigy
Post Prodigy

Get-PowerBIReport - intermittent task canceled errors

Hi,

 

 

We have as sript which gets reports in workspaces and sometimes runs o.k. but sometimes get task canceled errors - what causes task canceled error and how can we resolve?

 

 

Get-PowerBIReport : A task was canceled.
At C:\pbi_pshell\powerbi_tenant.ps1:84 char:26
+ ... $report in (Get-PowerBIReport -Scope Organization -WorkspaceId $works ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...etPowerBIReport:GetPowerBIReport) [Get-PowerBIReport], TaskCanceledException
+ FullyQualifiedErrorId : A task was canceled.,Microsoft.PowerBI.Commands.Reports.GetPowerBIReport

 

 

c

part of example code

 

$logpath = $logbase + "reports.csv"
$Reports =
ForEach ($workspace in $Workspaces)
{
Write-Output "Writing reports...on workspace: " $workspace.Name >> C:\pbi_pshell\powerbi_tenant_log.txt
ForEach ($report in (Get-PowerBIReport -Scope Organization -WorkspaceId $workspace.Id))
{
[pscustomobject]@{
WorkspaceID = $workspace.Id
WorkspaceName = $workspace.Name
ReportID = $report.Id
ReportName = $report.Name
ReportURL = $report.WebUrl
ReportDatasetID = $report.DatasetId
}
}
}
$Reports | Export-Csv -Path $logpath -NoTypeInformation

 

 

 

 

2 REPLIES 2
lbendlin
Super User
Super User

tenant/capacity running too hot.  You got kicked out because other processes needed the memory/renderers.

Thanks for update

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.