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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
chwolff
Microsoft Employee
Microsoft Employee

Remove-PowerBIWorkspaceUser for service principals and aad groups

Hi, 

 

I am currently developing a script for setting up customer workspaces. I make heavy use of the Power BI PowerShell cmdlets whereever possible - and if not REST-API. 

Addings members of type "App", "Group" and "ServicePrincipal"  with Add-PowerBIWorkspaceUser is supported. But the removal of "Group" and "ServicePrincipal" via Remove-PowerBIWorkspaceUser is not. I can also find not the correct REST-API endpoint. 

For each workspace permission role (Admin, Contributor, Member, Viewer) we are making use of AAD groups. ServicePrincipals are used to automate processes. The question is now: How to i remove those groups and principals once the assingment has changed via PowerShell?

 

Pretty sure its just me having to much tomato soup ...

Thank you very much

 

Greetings

 

chwolff

1 REPLY 1
lbendlin
Super User
Super User

The process is slightly different for service principals.

 

Groups - Delete User In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.