<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get Dashboards As Admin Expand Tiles Not Working in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Get-Dashboards-As-Admin-Expand-Tiles-Not-Working/m-p/1649094#M27709</link>
    <description>&lt;P&gt;I discovered the "Try It" button on the API documentation page.&amp;nbsp;&amp;nbsp; After playing with this it gave me more meaningful responses then then the Power BI Invoke-PowerBiResetMethod cmdlet does.&amp;nbsp;&amp;nbsp; I discovered I needed to add the $top query parameter in order for the $expand parameter to take effect.&amp;nbsp;&amp;nbsp; 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.&amp;nbsp; Final URL endpoint to get it working....&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/admin/dashboards?$expand=tiles&amp;amp;$top=5000" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/admin/dashboards?$expand=tiles&amp;amp;$top=5000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Feb 2021 23:47:36 GMT</pubDate>
    <dc:creator>TravisKale</dc:creator>
    <dc:date>2021-02-05T23:47:36Z</dc:date>
    <item>
      <title>Get Dashboards As Admin Expand Tiles Not Working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-Dashboards-As-Admin-Expand-Tiles-Not-Working/m-p/1646102#M27682</link>
      <description>&lt;P&gt;In PowerShell I am issuing the following to the Power BI API to get dashboards while expanding tiles:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;$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&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The call is successful, no errors, but the Json result does not contain a Tiles array.&amp;nbsp; If I use the /tiles REST endpoint, as commented out on 2nd line, I can get tiles.&amp;nbsp; 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.&amp;nbsp; Am I doing something wrong or is the API busted?&amp;nbsp; I believe I am following the&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/admin/dashboards_getdashboardsasadmin" target="_self"&gt;Documentation&lt;/A&gt; to the letter. &amp;nbsp; I don't see a way to get the Tiles collection using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Get-PowerBIDashboard -Scope Organization&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a full test case PowerShell script to show the issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;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" &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The output window shows the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;https://api.powerbi.com/v1.0/myorg/admin/dashboards?$expand=tiles
Can't find word datasetId in result
Found IsReadOnly
done&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 14:18:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-Dashboards-As-Admin-Expand-Tiles-Not-Working/m-p/1646102#M27682</guid>
      <dc:creator>TravisKale</dc:creator>
      <dc:date>2021-02-05T14:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get Dashboards As Admin Expand Tiles Not Working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Get-Dashboards-As-Admin-Expand-Tiles-Not-Working/m-p/1649094#M27709</link>
      <description>&lt;P&gt;I discovered the "Try It" button on the API documentation page.&amp;nbsp;&amp;nbsp; After playing with this it gave me more meaningful responses then then the Power BI Invoke-PowerBiResetMethod cmdlet does.&amp;nbsp;&amp;nbsp; I discovered I needed to add the $top query parameter in order for the $expand parameter to take effect.&amp;nbsp;&amp;nbsp; 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.&amp;nbsp; Final URL endpoint to get it working....&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/admin/dashboards?$expand=tiles&amp;amp;$top=5000" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/admin/dashboards?$expand=tiles&amp;amp;$top=5000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 23:47:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Get-Dashboards-As-Admin-Expand-Tiles-Not-Working/m-p/1649094#M27709</guid>
      <dc:creator>TravisKale</dc:creator>
      <dc:date>2021-02-05T23:47:36Z</dc:date>
    </item>
  </channel>
</rss>

