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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
DavidPi
Advocate II
Advocate II

Power BI API - return unexpexted result

Hello, 

 

I am trying to use Postman and call Power BI API.

First I call https://login.microsoftonline.com/9b511fda-f0b1-43a5-b06e-1e720f64520a/oauth2/token and received token. That is ok.

Then I call https://api.powerbi.com/v1.0/myorg/groups and recieve this:

 

{
"@odata.context": "http://wabi-north-europe-f-primary-redirect.analysis.windows.net/v1.0/myorg/$metadata#groups",
"@odata.count": 0,
"value": []
}

 

Access-Control-Expose-Headers →RequestId
Cache-Control →no-store, must-revalidate, no-cache
Connection →Close
Content-Type →application/json; odata.metadata=minimal
Date →Fri, 20 May 2022 07:17:45 GMT
OData-Version →4.0
Pragma →no-cache
RequestId →dde92e15-0829-4a55-9214-c325dd58a90e
Strict-Transport-Security →max-age=31536000; includeSubDomains
Transfer-Encoding →chunked
Via →Proxy
X-Content-Type-Options →nosniff
X-Frame-Options →deny
request-redirected →true
 
What is the problem?
 
Thx.
 
David
1 ACCEPTED SOLUTION

You're supposed to cal the official API at https://api.powerbi.com/v1.0/myorg/groups

 

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

 

Do you see the same error message there?  Do you maybe not have access to any workspaces in your tenant?

View solution in original post

7 REPLIES 7
DavidPi
Advocate II
Advocate II

Yes, it was problem of permission. I add security group (which contains service principal) as admin to my workspaces and it starts working. 

Thank you for your help.

There is another API call "Get Groups as Admin".

DavidPi
Advocate II
Advocate II

I see, maybe thats why @odata.count: 0 - our app don't have permission.

I am going to ask our tenant admins.

lbendlin
Super User
Super User

please post the actual error message

 

I call api.powerbi.com and don't receive list of workspaces but only this json:

 

{
"@odata.context": "http://wabi-north-europe-f-primary-redirect.analysis.windows.net/v1.0/myorg/$metadata#groups",
"@odata.count": 0,
"value": []
}

 

I try to call directly http://wabi-north-europe-f-primary-redirect.analysis.windows.net/v1.0/myorg/$metadata#groups and receive:

502 Badgateway - The proxy did not receive a valid response in time.

 

D.

 

You're supposed to cal the official API at https://api.powerbi.com/v1.0/myorg/groups

 

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

 

Do you see the same error message there?  Do you maybe not have access to any workspaces in your tenant?

I call official API at https://api.powerbi.com/v1.0/myorg/groups but I receive only this JSON:

 

{
"@odata.context": "http://wabi-north-europe-f-primary-redirect.analysis.windows.net/v1.0/myorg/$metadata#groups",
"@odata.count": 0,
"value": []
}

 

If I do not have access to no workspaces I would expect empty list.

 

D.

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.