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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
TravisKale
Helper I
Helper I

Get Dashboards As Admin Expand Tiles Not Working

In PowerShell I am issuing the following to the Power BI API to get dashboards while expanding tiles:

 

$dashboardsApiUrl = "https://api.powerbi.com/v1.0/myorg/admin/dashboards?$expand=tiles"
#$dashboardsApiUrl = "https://api.powerbi.com/v1.0/myorg/admin/dashboards/{dashboardGuid}/tiles"
$apiDashboardsResult = Invoke-PowerBIRestMethod -Url $dashboardsApiUrl -Method Get 
echo $apiDashboardsResult

 

 The call is successful, no errors, but the Json result does not contain a Tiles array.  If I use the /tiles REST endpoint, as commented out on 2nd line, I can get tiles.  Would be much more efficient in terms of time to execute if expand worked and I could avoid the roundtrip for each dashboard in the org.  Am I doing something wrong or is the API busted?  I believe I am following the Documentation to the letter.   I don't see a way to get the Tiles collection using 

 

Get-PowerBIDashboard -Scope Organization

 

Here is a full test case PowerShell script to show the issue:

 

Login-PowerBI
$ApiUrl = 'https://api.powerbi.com/v1.0/myorg/admin/dashboards?$expand=tiles'
echo $ApiUrl
$apiResult = Invoke-PowerBIRestMethod -Url $datasourceApiUrl -Method Get 
#datasetId is a property on the tiles object, it should be found if tiles were included
if($apiResult -like '*datasetId*') 
{ echo "Found datasetId" } else {echo "Can't find word datasetId in result"}
#control group, should find isReadOnly as it is part of the Dashboard Object and proving casing doesn't matter in search
if($apiResult -like '*isreadonly*') 
{ echo "Found IsReadOnly" } else {echo "Can't find word IsReadOnly in result"}
$apiObjectResult =   $apiResult | ConvertFrom-Json 
$dashboards = $apiObjectResult.value
ForEach ($d in $dashboards)
{
   ForEach($tile in $d.tiles)
   {
    echo "found a tile"
    echo $tile
   }
}
echo "done" 

 

 The output window shows the following:

 

https://api.powerbi.com/v1.0/myorg/admin/dashboards?$expand=tiles
Can't find word datasetId in result
Found IsReadOnly
done

 

1 ACCEPTED SOLUTION
TravisKale
Helper I
Helper I

I discovered the "Try It" button on the API documentation page.   After playing with this it gave me more meaningful responses then then the Power BI Invoke-PowerBiResetMethod cmdlet does.   I discovered I needed to add the $top query parameter in order for the $expand parameter to take effect.   When using the cmdlet it apears the behavior is just to throw out the $expand parameter if $top is missing and sweep it all under the rug pretending nothing happened.  Final URL endpoint to get it working....

https://api.powerbi.com/v1.0/myorg/admin/dashboards?$expand=tiles&$top=5000

 

View solution in original post

1 REPLY 1
TravisKale
Helper I
Helper I

I discovered the "Try It" button on the API documentation page.   After playing with this it gave me more meaningful responses then then the Power BI Invoke-PowerBiResetMethod cmdlet does.   I discovered I needed to add the $top query parameter in order for the $expand parameter to take effect.   When using the cmdlet it apears the behavior is just to throw out the $expand parameter if $top is missing and sweep it all under the rug pretending nothing happened.  Final URL endpoint to get it working....

https://api.powerbi.com/v1.0/myorg/admin/dashboards?$expand=tiles&$top=5000

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.