Published on

June 28, 2020

How to Add Users to a Power BI Workspace using Power BI PowerShell

In this article, we will explore how to add users to a Power BI workspace using Power BI PowerShell. Power BI is a powerful business intelligence tool from Microsoft that allows users to build graphical reports and dashboards to make sense of their data. The Power BI service, a web interface, enables users to share and collaborate on these reports and dashboards with others.

Before we dive into adding users to a Power BI workspace, let’s first understand the various roles available within the workspace. These roles determine the level of access and permissions each user has within the workspace.

The four primary roles in Power BI workspace are:

  • Admin – Users with administrative tasks and permissions within the workspace.
  • Member – Users with similar privileges as admins, except they cannot operate on admin users.
  • Contributor – Users with fewer privileges than members, but can add, modify, or delete content in the workspace.
  • Viewer – Users with the least permissions, only allowed to view and interact with certain reports.

Now that we have an understanding of the roles, let’s proceed with adding users to a Power BI workspace using Power BI PowerShell.

First, we need to connect to the Power BI service account using PowerShell. Open PowerShell ISE and run the following command:

Connect-PowerBIServiceAccount

You will be prompted to enter your username and password for the Power BI service account. Once logged in successfully, you will receive a confirmation in the PowerShell terminal.

Next, we can run the command to add users to the workspace. Before doing so, let’s verify the current users in the workspace using the Power BI web portal. Navigate to https://app.powerbi.com and sign in with the same credentials used in the PowerShell terminal.

Once logged in, you can see the list of users and their roles in the workspace. To add a new user, run the following command in PowerShell:

Add-PowerBIWorkspaceUser -Scope Organization -Id <WORKSPACE_ID> -UserEmailAddress <EMAIL_ADDRESS> -AccessRight Contributor

Replace <WORKSPACE_ID> with the ID of the workspace and <EMAIL_ADDRESS> with the email address of the user you want to add. This command will add the user with the contributor role to the workspace.

You can verify the addition of the user by refreshing the Power BI web portal and checking the list of users in the workspace.

If you need to modify the role of an existing user, you can run the same command again with the desired role. For example, to change the role of a user to member, run:

Add-PowerBIWorkspaceUser -Scope Organization -Id <WORKSPACE_ID> -UserEmailAddress <EMAIL_ADDRESS> -AccessRight Member

Refresh the Power BI web portal to see the updated role for the user.

In conclusion, adding users to a Power BI workspace using Power BI PowerShell commandlets is an essential administrative task to control access to specific reports. By understanding the available roles and using PowerShell commands, you can easily manage users and their permissions within a Power BI workspace.

Click to rate this post!
[Total: 0 Average: 0]

Let's work together

Send us a message or book free introductory meeting with us using button below.