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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
DavidCousinsT
Advocate I
Advocate I

REST API and deleting content from other users My Workspace

Hi there,

 

As there is no way to stop people uploading data to Power BI via "My Workspace", we've got a need to audit and actively clear out the personal workspaces of our users regularly. This is in addition to education and other fun governance things, but we're a large org and need to put multiple things in place to satisfy our security peeps. They're a bit aghast that thousands of report consumers with free licenses can just click a button and upload anything they like, and I dont blame them as it is a governance nightmare.

 

I've figured out the audit side and we've now got PBI reports running against the REST APIs that list all reports/datasets/etc. that people have uploaded to "My Workspace". The tricky thing now is to delete them, and here I've hit a problem: It looks like the REST API can't actually do anything to a users Personal Workspace (what the service calls My Workspace).

 

https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/deletedataset - Gives a 404 as it can't see the dataset (as it's not in My "My workspace" but someone elses "My Workspace")

https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/deletedatasetingroup - Gives 401 no authorization, which is fun because I'm a tenant admin. This also gives a 401 against my own "My Workspace", but works fine against a modern workspace, so it looks like it's an old O365 group vs Modern Workspace issue.

 

These have also been tried with a service principal that has been given the ReadWrite.All permissions and the permissions in the Power BI Tenant pages. Nothing works.

 

Has anyone had luck clearing out peoples Personal Workspaces?

 

Thanks.

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @DavidCousinsT ,

It depends on the account you log in to the API. You can only find or delete the dataset in your My workspace when you log in with your own account, and you cannot delete the dataset in other people's My workspace. . . In addition, I did not find a way to delete the dataset in other people's My workspace through tenant admin. You can check the document below for the details.

Admin

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @DavidCousinsT ,

It depends on the account you log in to the API. You can only find or delete the dataset in your My workspace when you log in with your own account, and you cannot delete the dataset in other people's My workspace. . . In addition, I did not find a way to delete the dataset in other people's My workspace through tenant admin. You can check the document below for the details.

Admin

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.