This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi Guys,
i have issue with WriteError using pwoerShell and power BI rest Api.
Command to connect to power bi rest API:
1) Login-PowerBI
2) Get-PowerBIDataset which is throwing this result:
and i am interested in changing parameters for shown dataset.
3) Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/datasets/16d0298e-4dda-493b-baf9-0bbbf84d1995/parameters" -Method GET
and as you can see i have 2 parameters and want to change DatabaseName from "test" to "unit"
4) declaring body variable like here:
return from this:
but last method is not working for me:
Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/datasets/16d0298e-4dda-493b-baf9-0bbbf84d1995/Default.UpdateParameters" -Method POST -Body $body
Can anybody help and say why it is not working?
Fiddler's answer:
CE
{"error":{"code":"InvalidRequest","message":"Dataset parameter at position 1 is invalid in 16d0298e-4dda-493b-baf9-0bbbf84d1995. Reason: ActionNotSupported","target":"16d0298e-4dda-493b-baf9-0bbbf84d1995"}}
0
Best,
Jacek
Solved! Go to Solution.
I'm trying to use this method to update which database the report is supposed to connect to as well but running into the same invalid operation error. You say you solved it, but I don't quite understand how. Could you elaborate?
Ok,
parameter has to be as text lol not Any...
Best,
Jacek
Ok what i am noticing when i am in power BI Service i can not edit parameters manually also! Why?
Best,
Jacek
Anyone is using this method to change parameters?
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 10 | |
| 8 | |
| 8 | |
| 8 | |
| 7 |
| User | Count |
|---|---|
| 49 | |
| 27 | |
| 24 | |
| 20 | |
| 20 |