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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.