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

4 REPLIES 4
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... 

View solution in original post

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.

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.