Quick Blog: Clone Power BI Workspace Permissions

A task I’ve had to do a countless number of times is to setup a new Workspace in the Power BI service, and then copy all (or nearly all) the contents of an existing Workspace over to that new Workspace. This is such a common task that the Power BI team went ahead and wrote a blog post on “Duplicating workspaces by using Power BI cmdlets” earlier this year.

However, one detail they left out of that post is how to clone the users & groups, and their respective permissions from one Workspace to another. It’s a pretty simple thing to do, with one not-completely-obvious quirk to it.

Currently, you have to be a Power BI Admin in order to retrieve the list of users/groups & their permission levels. If you are one, the rest is pretty straight forward. Just make sure you have the MicrosoftPowerBIMgmt module installed, run Login-PowerBI, then run the script below.

There is one unfortunate kink to the script above. You’ll notice this line WHERE { $_.AccessRight -ne Viewer } in there because at this time, the Add-PowerBIWorkspaceUser cmdlet doesn’t handle adding a user and granting them the new Viewer role. I have already filed an issue in the GitHub repo for the Power BI PowerShell cmdlets. Please feel-free to comment & Up-Vote this issue if you need this fixed too.

That’s pretty much it for now, I hope this helps!

Please Share This:

Share on facebook
Share on twitter
Share on linkedin

You may also like:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Follow:

Subcribe to Blog Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

What I'm Saying on Twitter

Subscribe via feedburner