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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
DavidPi
Helper II
Helper 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
Helper II
Helper 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
Helper II
Helper 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors