Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

Add a user as admin to all workspaces

Hi Guys
is there a ready-to-use script to add a user as Admin to all workspaces in PowerBI.


Any info is greatly appreciated.


Solution Sage
Solution Sage

Hi @Sandeep3596 

You can use Power BI REST Admin API.


1. Get all the workspaces -


2. Loop through above workspaces one by one and add the users as admin -




Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.

My Blog :: YouTube Channel :: My Linkedin

Helpful resources

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors