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
viji123
Frequent Visitor

How to remove the access of multiple users from a workspace easily?

Hi all!

I have a workspace to which more than 500 users who have access.

Now i need to remove all users except the 2 admin users

Is there a way to remove the access of all users (or atleast multiple users) from workspace instead of removing access for each user one by one as below?Removing access of each user in this method is time consuming.

viji123_0-1659420683959.png

 

Is there any Power BI REST API command to remove the access of all users (or atleast multiple users) at one go?


Appreciate any response.
TIA!

1 ACCEPTED SOLUTION

Hi. I'm not sure how many users you have exactly but yes. You need to loop the users at workspaces. If you have a list of 500 that you are sure they shouldn't be at workspaces then yes. Loop the 500 removing them from workspaces. That's the only way to build the login in a script for now. The API won't allow batch delete of many users at the same time. 
This is why using office or azure AD groups is so important. If you have your company properly organized by groups you can just remove the group.

I hope that helps,


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

Happy to help!

LaDataWeb Blog

View solution in original post

3 REPLIES 3
viji123
Frequent Visitor

Hi @ibarrau 
Thanks for your reply.
Do you suggest i have to programmatically call the DELETE API in a loop 500+ times to delete each user?
Kindly clarify

Hi. I'm not sure how many users you have exactly but yes. You need to loop the users at workspaces. If you have a list of 500 that you are sure they shouldn't be at workspaces then yes. Loop the 500 removing them from workspaces. That's the only way to build the login in a script for now. The API won't allow batch delete of many users at the same time. 
This is why using office or azure AD groups is so important. If you have your company properly organized by groups you can just remove the group.

I hope that helps,


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

Happy to help!

LaDataWeb Blog

ibarrau
Super User
Super User

Hi! the request from the API that you can use is the DELETE a user from GROUP. The thing is that you need to specify de workspace id and the user. So you might need to build a nice logic for your script. 

The following request is the one you can use: https://docs.microsoft.com/en-us/rest/api/power-bi/groups/delete-user-in-group

You can use PowerShell cmdlets or SimplePBI python lib if you want to keep the use of the API simpler.

I hope that helps,


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

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.