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

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.

Reply
Anonymous
Not applicable

Extracting dataset owners using Power Shell script

Hello Team,

 

Is there a way to extract dataset owners using Power Shell script. If it is possible please send me the Powershell script.

 

Thanks in advance!

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @Anonymous ,

here you will find a Powershell script:

Import-Module -Name MicrosoftPowerBIMgmt

# Connect as Serviceadministrator
Connect-PowerBIServiceAccount

$datasetID = " ... your datasetid goes here ..."
$uriAPICall = "https://api.powerbi.com/v1.0/myorg/datasets/$datasetID/users"
$uriAPICall_Obj = Invoke-PowerBIRestMethod -Url $uriAPICall -Method GET

$uriAPICall_Obj

Disconnect-PowerBIServiceAccount



Read here about the API function endpoint: 
Datasets - Get Dataset Users - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Hopefully, this will help to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

1 REPLY 1
TomMartens
Super User
Super User

Hey @Anonymous ,

here you will find a Powershell script:

Import-Module -Name MicrosoftPowerBIMgmt

# Connect as Serviceadministrator
Connect-PowerBIServiceAccount

$datasetID = " ... your datasetid goes here ..."
$uriAPICall = "https://api.powerbi.com/v1.0/myorg/datasets/$datasetID/users"
$uriAPICall_Obj = Invoke-PowerBIRestMethod -Url $uriAPICall -Method GET

$uriAPICall_Obj

Disconnect-PowerBIServiceAccount



Read here about the API function endpoint: 
Datasets - Get Dataset Users - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Hopefully, this will help to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors