Forum Discussion
DerekLedbetter
1 year agoFrequent Visitor
API - Admin - Groups GetGroupsAsAdmin - can't get it to work
To whom it may concern: I've tried following the documentation at Admin - Groups GetGroupsAsAdmin - REST API (Power BI Power BI REST APIs) | Microsoft Learn. Granted I've built a powershell and ...
- 1 year ago
run a second call
$topn="%24top=5000"
$skip="%24skip=5000"
$Url = "https://api.powerbi.com/v1.0/myorg/admin/groups?$topn&$skip"
lbendlin
1 year agoSuper User
$uri = "https://api.powerbi.com/v1.0/myorg/admin/groups?$top=100"
...
$response = Invoke-PowerRestMethod -Url $uri -Method Get -headers $headers
Wrong uri format. If you use Invoke-PowerBIRestMethod (not Invoke-PowerRestMethod) then you are supposed to supply a relative URI "admin/groups/..."
DerekLedbetter
1 year agoFrequent Visitor
Thanks for the reply.
I've not been using - Invoke-PowerBIRestMethod (MicrosoftPowerBIMgmt.Profile) | Microsoft Learn.
I've been using - Invoke-RestMethod -Uri $Url -Method get -Headers $headers
I did get it to work after going back to my original. The issue, is I have 9424 workspaces and need them all, not just the 5000.