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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
kdevroede
Frequent Visitor

Power BI Rest API GetGroupsAsAdmin users expansion no longer working for personal workspaces

Hello,

 

We have been usin the Power BI Rest API GetGroupsAsAdmin in 2 ways:

  • in powershell with the option expand=users: 
    $tenantRestResult = Invoke-PowerBIRestMethod -Url ‘admin/groups?$top=1000&$expand=users’ -Method Get | ConvertFrom-Json
  • Through the Power BI Rest API custom connector from Miguel Escobar:
    https://www.thepoweruser.com/2021/02/21/power-bi-rest-api-connector/
    which is using the same APIs in its implementation 

This was working fine previous month (we are not yet running daily refreshes) but refreshes beginning of October revealed a problem.

 

For all personal groups, this API now results in an empty users list to be returned.

kdevroede_0-1634311159453.png

 

Has anyone else experience this problem? 

Is this a deliberate change from Microsoft?

If we call the specific API GetGroupUsersAsAdmin with one of these personal workspace IDs, we do get user detailed information back.

But the entire idea of using the first API with the expand option is to avoid the need to implement a loop and call the specific API for each workspace (whiwh will result in hitting limits of number of API calls etc.)

 

Tx

 

Koen

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

For larger tenants, this meant bumping into API Limits all the time .. The GetGroupsAsAdmin API is called once for every workspace, and will return all the specified information in a single go(Maximum 200 requests per hour).

There’s a limit for 5000 workspaces per call, but you can work your way around this by intelligently looping over this.

https://powerbi.microsoft.com/en-us/blog/avoiding-workspace-loops-by-expanding-navigation-properties... 

View solution in original post

5 REPLIES 5
JZT
Frequent Visitor

Hi @kdevroede, I've run into the same issue and digging into the documentation it appears that all user membership data is / will be removed from the GetGroupsAsAdmin endpoint. From the doco https://docs.microsoft.com/en-us/rest/api/power-bi/admin/groups-get-groups-as-admin#group

 

"The users that belong to the group, and their access rights. This value will be empty. It will be removed from the payload response in an upcoming release. To retrieve user information on an artifact, please consider using the Get Group User APIs, or the PostWorkspaceInfo API with the getArtifactUser parameter."

kdevroede
Frequent Visitor

Tx JZT

 

That clarifies so I'm now experimenting with the PostWorkspaceInfo API..

 

V-lianl-msft
Community Support
Community Support

For larger tenants, this meant bumping into API Limits all the time .. The GetGroupsAsAdmin API is called once for every workspace, and will return all the specified information in a single go(Maximum 200 requests per hour).

There’s a limit for 5000 workspaces per call, but you can work your way around this by intelligently looping over this.

https://powerbi.microsoft.com/en-us/blog/avoiding-workspace-loops-by-expanding-navigation-properties... 

Hi,

Tx for the reply but this is actually my point: we do not want to loop, we do not have more than 5000 workspaces but we have noticed that there is a difference in behavior with the expand=users option compared to before: we no longer get user information back for Personal workspaces so our expand-based solution currently no longer works and I would like to know if this is a regression/bug or a planned change by Microsoft and if so, what would be a solution to avoid going back to looping and hitting the API limitations.

 

Since the Groups GetGroupsAsAdmin parameter $expand=users only works for "New Workspace Experience" workspaces, we're having to loop through our non-upgraded workspaces using Groups GetGroupsUsersAsAdmin for every "type=group"  workspace. With over 200 groups, just refreshing preview in Power Query editor will hit this limit, making development a time-consuming challenge. 

 

A hint: use Table.FirstN while developing queries in Query Editor if you're working against throttling issues with APIs. You can remove the step once everything is looking good. 

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors