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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello
I am trying to call API for Transfers ownership over the specified dataset, it works fine on web but when i am trying on Desktop Powershell ISE it gives me Error
Command in powershell ISE not working
$Results = Invoke-RestMethod -Headers $headers -Uri 'https://api.powerbi.com/v1.0/myorg/groups/{groupID}/datasets/{DatasetID}/Default.TakeOver'
$Results | FL
Error
Invoke-RestMethod : The remote server returned an error: (404) Not Found.
At line:1 char:12
+ $Results = Invoke-RestMethod -Headers $headers -Uri 'https://api.powe ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Can anyone help me, what i am doing wrong ?
Thanks
Yes I had installed , please refer below command
import-module microsoftpowerbimgmt
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 58 | |
| 56 | |
| 35 | |
| 18 | |
| 14 |