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

Be 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

Reply
tahechadv_2022
Helper II
Helper II

PBI API Rest: endpoints are returning empty values

[Python code]


base_url = 'https://api.powerbi.com/v1.0/myorg/'
header = {'Authorization': f'Bearer {access_token}'}
dedicated_groups = 'groups'
groups = requests.get(base_url + dedicated_groups, headers=header)

try:
    groups = json.loads(groups.content)
    print(json.dumps(groups, indent=4, sort_keys=True))
except Exception as e:
    print('\nRequest failed:', e)

pd.concat([pd.json_normalize(x) for x in groups['value']])

 

And it returns:

<Response [200]> 
{
"@odata.context": "
https://wabi-brazil-south-b-primary-redirect.analysis.windows.net/v1.0/myorg/$metadata#groups",
"@odata.count": 0,
"value": []
}

 

This problem occurs in multiple endpoints, get_dashboards.

But it works in the get_capacities endpoint.

 

Background:

I have the admin account called "dados", under this account I have the account "dashboards".

All of my dashboards are hosted in the "dashboards" account spread throughtout 4 workspaces (groups).

 

All of the access were granted to both accounts in the PBI Admin portal, both for workspaces and dashboards. Also in the Admin Portal was granted access to the API.

 

Can someone help me?

1 ACCEPTED SOLUTION
5 REPLIES 5
lbendlin
Super User
Super User

Run your request in the sandbox first.  

 

Groups - Get Groups - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

See if you get data there.

And if it doesnt work?

Then you don't have enough permissions.

What are the permissions required beyond the API (admin portal), workspaces and dashboards?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.