Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
jbhayani1987
Microsoft Employee
Microsoft Employee

Datasets - Take Over In Group API not working on Laptop PowerShell

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

3 REPLIES 3
GilbertQ
Super User
Super User

Hi there

have you installed the required Power BI PowerShell Modules on your PowerShell ISE?

https://docs.microsoft.com/en-us/powershell/power-bi/overview?view=powerbi-ps




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Yes I had installed , please refer below command

 

import-module microsoftpowerbimgmt

Hi there

Can you make sure you have got all the modules installed?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors