March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello Power BI community,
I am having some troubles while trying to collect all PowerBI dashboard GUID by Workspace ID using Get-PowerBIDashboard cmdlet. I should be able to get the result I want by running Get-PowerBIDashboard -Scope Organization -WorkspaceId <Workspace GUID>, however, when I run this, the cmdlet will take a while to process and eventually throw me an error as presented below:
---
Get-PowerBIDashboard : A task was canceled.
At line:1 char:1
+ Get-PowerBIDashboard -Scope Organization -WorkspaceId $Object ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...owerBIDashboard:GetPowerBIDashboard) [Get-PowerBIDashboard], TaskCanceledException
+ FullyQualifiedErrorId : A task was canceled.,Microsoft.PowerBI.Commands.Reports.GetPowerBIDashboard
---
The interesting part about this is whenever I run this cmdlet without -WorkspaceId parameter, Get-PowerBIDashboard -Scope Organization, I am able to get all dashboard GUID with all its properties. But in my case, the missing -WorkspaceId parameter is needed because I NEED Workspace ID to accomplish my task so that I can build a PowerBI report that uses Workspace ID as reference to form relationship between reports table & dashboard table.
Another interesting part about this is that this command, Get-PowerBIDashboard -Scope Organization -WorkspaceId <Workspace GUID>, does work sometime where it successfully collect all of the dashboard GUID based on calling -WorkspaceId parameter, and I have no idea why. The problem here is that I need this command to work consistently as this command is being run as a scheduled job in one of the servers.
Therefore, I would like to know if anyone here can help me to identify this issue and get it resolve. Any suggestions or workaround to collect the Dashboard's Workspace ID based on Dashboard ID will also be truly appreciated. Thanks in advance.
---
I have tried GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/dashboards but receive an error.
Code is presented below:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.