Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
We get an error in powershell with "invoke-RestMethod" on "https://api.powerbi.com/v1.0/myorg/admin/groups."
$groups = Invoke-RestMethod -Uri $urigroups –Headers $authHeader –Method GET –Verbose
VERBOSE: GET https://api.powerbi.com/v1.0/myorg/admin/groups with 0-byte payload
Invoke-RestMethod : The remote server returned an error: (400) Bad Request.
At line:2 char:11
+ $groups = Invoke-RestMethod -Uri $urigroups –Headers $authHeader –Method GET –Ve ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
On "https://api.powerbi.com/v1.0/myorg/admin/datasets" we do not receive an error:
VERBOSE: GET https://api.powerbi.com/v1.0/myorg/admin/datasets with 0-byte payload
VERBOSE: received -1-byte response of content type application/json; odata.metadata=minimal; odata.streaming=true
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.