cancel
Showing results for 
Search instead for 
Did you mean: 
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
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors