Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello, I am new to powershell and was working on using Power BI REST APIs. I have no problems with the ones using read permissions, but when it comes to the ones to write (POST), i am getting the following error:
Exception : System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at Microsoft.PowerBI.Commands.Profile.InvokePowerBIRestMethod.<InvokeRestMethod>d__35.MoveNext() (the error is on the image on top!)
In this case i was using the following for the "update parameter in group" REST API:
Invoke-PowerBIRestMethod -Url $url -Method POST -Body (ConvertTo-Json #body_request)
$body_request = @'
{
"updateDetails":
{
"name": "ServerName",
"newValue": "qa-clean"
}
}
'@
I may be wrong, but I read documentation before which told that administrators can use the Power BI APIs without needing to register an app in azure. Is this fact true?
Thank you for reading:)
Solved! Go to Solution.
Try running the same API call in the sandbox.
Datasets - Update Parameters In Group (Power BI Power BI REST APIs) | Microsoft Docs
Try running the same API call in the sandbox.
Datasets - Update Parameters In Group (Power BI Power BI REST APIs) | Microsoft Docs
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |