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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
Anonymous
Not applicable

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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