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
mavhernandez
Regular Visitor

Remove security AAD groups from Workspace

I've been working on simple automation like adding aad users to aad groups and pbi workspaces. I can add users to workspace , even add groups to workspaces but I cannot remove the groups, although I can remove the users from the workspaces. I've been searching for a week now, but no-one came close. Did anyone figure out how to approach this through Powershell? thanks

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @mavhernandez ,

 

As far as I know, we can remove the group or users from workspcae access.

RicoZhou_0-1665037361504.png

This function works well in my side, I can remove the security gourp scuccessfully.

Or you can try to remove the user by Power BI Rest API.

For reference: Groups - Delete User In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

This API call can be called by a service principal profile. For more information see: Service principal profiles in Power BI Embedded.

 

Best Regards,
Rico Zhou

 

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

 

Thanks Rico Zhou,
UI interaction also works for me. For the REST API not really much experience in that department yet, a sample how to execute it in python / powershell would be really great. I've  seen some sample on the internet however, there were nothing that removes the AAD security group from the workspace.

Below is a sample of my ADD to workspace approach

mavhernandez_0-1665444512315.png

and below is the one I am working on with PowerShell but no luck

mavhernandez_1-1665444564922.png

 



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.