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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

To know to what workspace belong a given dataset

Hi community!

 

I'm admin of a tenant and I need to know to what workspace belong a given dataset.

 

The only information I have is the ID of the dataset, but I want to know:

1) to which workspace belong that dataset in the tenant

2) who are the members and admins of that workspace

3) take the ownership of that workspace

 

What are the steps to do that ? I tried this in PowerShell ISE...

Invoke-PowerBIRestMethod -Url 'https://api.powerbi.com/v1.0/myorg/admin/datasets' -Method Get 

 

...but it give me the information of all the datasets in the tenant, but that information doesn't include to which workspace belong each dataset

 

Help will be appreciated!

Thanks

Mauro

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @cavalierimauro

1.enumerate workplace that use the datasets by using the Get-PowerBIWorkspace cmdlet.

2.Find and Export Office 365 Group Members using Powershell

3.Use the PowerShell script below to take over the dataset in the Power BI Service.
This will allow you to keep everything as is, but change the Owner.

https://github.com/Azure-Samples/powerbi-powershell/blob/master/takeover-dataset.ps1

  

Reference:

Working with PowerShell in Power BI

Announcing APIs and PowerShell Cmdlets for Power BI Administrators

 

Best Regards

Maggie

Hi @v-juanli-msft, thanks for your quick answer

 

For the step 1 you mention, I already tried to use the Get-PowerBIWorkspace cmdlet in this way to retrieve the information:

 

Get-PowerBIWorkspace -Scope Organization

 

The problem is the information retrieved by that command doesn't include datasets IDs or reports IDs contained in each workspace. Do you know what would be the exact command to run in order to get only the workspaces that contain a specific dataset id or report id?

 

Thanks for you feedback,

Mauro

Hi @cavalierimauro

Get-PowerBIWorkspace cmdlet retrieves a list of Power BI workspaces that match the specified search criteria and scope.

"Get-PowerBIWorkspace -Scope Organization" returns a workspace within the user's organization.

 

To Enumerate all workspaces in an organization and then list the dashboards, tiles, reports, datasets, data sources, and imports in those workspaces.

Log in to Power BI as an admin, and then use the cmdlet Get-PowerBIWorkspace with the -Filter parameter.

Then pipe the output to Get-PowerBIDashboardGet-PowerBITileGet-PowerBIReport, Get-PowerBIDatasetGet-PowerBIDatasource, and Get-PowerBIImport to retrieve only the relevant resources from these workspaces.

Do not forget to specify -ScopeOrganization because the -Filter parameter is currently not supported in the individual scope.

 

Best Regards

Maggie

 

Thanks @v-juanli-msft, could you please detail the exact script to do that ? I know how to use Get-PowerBIWorkspace and Get-PowerBIDataset, but I don't realize how to merge two commands to get the datasets in each workspace as you said.

 

Could you do an example?

Thanks

Mauro

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors