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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Abhijit_Rej
New Member

Unable to fetch correct groups(workspaces) from using Power BI REST API

Hi

 

We are integrating Power BI REST APIs to perform certain usecases (e.g. get all workspaces, managing workspaces and users in a workspace) in our Azure based Power BI. We have created two SPN (Service Principal Name) for accessing production and non-production using the below steps.

  • Step1: Create SPN (Service Principal Name) by registering an application (single tenant)
  • Step2: Create certificates
  • Step3: Add owners 
  • Step4: Register application in Power BI 
  • Step5: Set API permissions
  • Step6: Enable API integrations for both APIs
  • Step7: Assigning Power BI Pro license to the Production SPN

 

Thereafter we have genarated access token using client id, client secret and tenant Id. Also able to fetch all the groups using the access token by using 'GET https://api.powerbi.com/v1.0/myorg/groups/' API.

 

The problem here is Production SPN should connect to Power BI Premium Instance and the Non-prod one should connect to default space. But when we are fetching using Production and Non-Prod SPN, both are returning same set of workspaces (groups) and those are the workspaces belong to default space.

 

So is there anything we are missing here? Please help us to resolve this issue.

 

Thanks in advance,

Abhijit

1 REPLY 1
lbendlin
Super User
Super User

what do you mean by "default space"  ?  Shared capacity?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors