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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
zhhorton
New Member

[ISSUE] Power BI REST API - GetDashboardsAsAdmin

Hello,

 

In an attempt to retrieve some information from our Fabric environment using the Power BI REST API (specifically, the GetDashboardsAsAdmin), we have run into an issue where the expand parameter is not accepted and will return a 400 Client Error: Bad request for url. Removal of the ?$expand=tiles returns the expected result, so it is not any other issue aside from the format of the GET request URL.

 

Link to referenced documentation (here)

 

Has anyone else run into this issue and found a way around it? The documentation provided may no longer be up to date. Thanks.

1 ACCEPTED SOLUTION
tayloramy
Super User
Super User

Hi @zhhorton

 

As mentioned in your data egnieering forum post: 

[ISSUE] Power BI REST API - GetDashboardsAsAdmin - Microsoft Fabric Community

When using $expand, a $top also needs to be specified. 

 

In my enviornment: 

GET https://api.powerbi.com/v1.0/myorg/admin/dashboards?%24expand=tiles

returns a 400 response with this body: 

{
  "error": {
    "code": "InvalidRequest",
    "message": "This API expects $top query option to be provided."
  }
}

 

Where as this:

GET https://api.powerbi.com/v1.0/myorg/admin/dashboards?%24expand=tiles&%24top=10

returns a 200 code with data

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, please mark this as the solution.

 





If you found this helpful, consider giving some Kudos.
If I answered your question or solved your problem, mark this post as the solution!

Join the Fabric Discord!

Proud to be a Super User!





View solution in original post

4 REPLIES 4
MJParikh
Super User
Super User

You’re hitting a known quirk with GetDashboardsAsAdmin:

$expand=tiles is supported, but it often fails unless the request is formed very specifically.

Do this (works reliably)

PowerShell (note $ escaping or use single quotes):

 
$url = 'https://api.powerbi.com/v1.0/myorg/admin/dashboards?$expand=tiles&$top=5000' Invoke-PowerBIRestMethod -Url $url -Method Get

(If you must use double quotes: ?`$expand=tiles&`$top=5000)

  • The endpoint does list $expand (supports tiles) in the official docs.

  • Community threads show $expand may be ignored or error out unless $top is also provided; adding $top consistently makes it work. 

If you still get 400

  • Ensure the host/path is exactly api.powerbi.com/v1.0/myorg/admin/dashboards (not the Fabric Graph host). 

  • Try URL-encoding the parameter name if your client mangles $: use ?%24expand=tiles&%24top=5000.

  • Strip any trailing slash before the query string.

  • Confirm scopes (Tenant.Read.All or Tenant.ReadWrite.All) and that your SPN setup follows the doc’s caveat for admin APIs.

 

Thank you @MJParikh, that is very helpful.

tayloramy
Super User
Super User

Hi @zhhorton

 

As mentioned in your data egnieering forum post: 

[ISSUE] Power BI REST API - GetDashboardsAsAdmin - Microsoft Fabric Community

When using $expand, a $top also needs to be specified. 

 

In my enviornment: 

GET https://api.powerbi.com/v1.0/myorg/admin/dashboards?%24expand=tiles

returns a 400 response with this body: 

{
  "error": {
    "code": "InvalidRequest",
    "message": "This API expects $top query option to be provided."
  }
}

 

Where as this:

GET https://api.powerbi.com/v1.0/myorg/admin/dashboards?%24expand=tiles&%24top=10

returns a 200 code with data

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, please mark this as the solution.

 





If you found this helpful, consider giving some Kudos.
If I answered your question or solved your problem, mark this post as the solution!

Join the Fabric Discord!

Proud to be a Super User!





Thank you @tayloramy, that is very helpful.

 

I have found the $top parameter is necessary much more than the documentation mentions which causes some confusion. I appreciate your help!

Helpful resources

Announcements
April Fabric Update Carousel

Fabric Monthly Update - April 2026

Check out the April 2026 Fabric update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.