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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Kudoed Authors