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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.