Sub topic 3
Workspace roles and who can publish
This chapter covers the four workspace roles, which of them can publish, and what each role can do once a report is in the workspace. It assumes you know what a workspace is from the previous chapter. It also assumes you can build a basic report in Power BI Desktop and sign in to the Power BI service with a work or school account.
Roles are the first gate
Publishing from Power BI Desktop is an upload into a workspace. The service accepts the upload only if your account holds a role in that workspace that allows it. Licensing is a separate requirement and is covered in the next chapter.
A role is a named set of permissions assigned to a person or group for one workspace. The same person can be an Admin in one workspace and a Viewer in another.
The four roles, from most to least powerful, are:
- Admin: full control of the workspace, including its settings, its membership, and deleting it.
- Member: can publish and manage content, and can add people to lower roles.
- Contributor: can publish and edit content, but cannot manage who has access.
- Viewer: can open and interact with content, but cannot publish or edit.
Only the first three can publish a report. A Viewer who tries to publish from Desktop does not see the workspace in the destination list, or gets a permission error.
What each role can do
The table lists the actions that matter for publishing. Roles are cumulative: each role can do everything the role below it can do.
| Action | Admin | Member | Contributor | Viewer |
|---|---|---|---|---|
| View reports and dashboards | Yes | Yes | Yes | Yes |
| Publish a new report from Desktop | Yes | Yes | Yes | No |
| Edit and delete workspace content | Yes | Yes | Yes | No |
| Republish over an existing report | Yes | Yes | Yes | No |
| Add Viewers, Contributors, and Members | Yes | Yes | No | No |
| Publish or update the workspace app | Yes | Yes | No | No |
| Add other Admins | Yes | No | No | No |
| Change workspace settings or delete the workspace | Yes | No | No | No |
The Contributor role is the usual choice for a report author. It allows publishing without letting the author change membership or publish the app that consumers use.
Your personal workspace
Every user also has My workspace, a personal area that only that user can use. You can always publish there, because you are its only owner. It is meant for experiments, not for sharing. Other people cannot be given roles in it, so a report published there is only visible to you unless you share it directly. For team reports, publish to a shared workspace.
Assigning roles
You assign roles in the Power BI service. Open the workspace, choose Manage access, then Add people or groups. Pick a role for each entry. You can assign roles to:
- individual users
- security groups
- Microsoft 365 groups
- distribution lists
Assigning a group is better than assigning individuals. When a person joins or leaves the team, you change the group once instead of editing every workspace.
If a person gets a role both directly and through a group, the highest role applies. For example, someone who is a Viewer directly and a Contributor through a group can publish. This also means removing a person's direct assignment does not revoke access if a group still grants a higher role.
Checking roles with PowerShell
You can read the membership of a workspace with the MicrosoftPowerBIMgmt module you installed in the topic's first code example. This script lists everyone with access and their role.
Connect-PowerBIServiceAccount
$ws = Get-PowerBIWorkspace -Name 'Sales Analytics'
$json = Invoke-PowerBIRestMethod -Url "groups/$($ws.Id)/users" -Method Get
($json | ConvertFrom-Json).value |
Select-Object displayName, emailAddress, principalType, groupUserAccessRight |
Format-Table -AutoSizeThe groupUserAccessRight column holds Admin, Member, Contributor, or Viewer. The principalType column tells you whether a row is a User, a Group, or an App.
To grant a role from a script, an Admin or Member can run:
Add-PowerBIWorkspaceUser -Id $ws.Id -UserEmailAddress '[email protected]' -AccessRight ContributorValid values for -AccessRight are Admin, Member, Contributor, and Viewer. The caller must hold a role that is allowed to add people at that level.
How the service decides whether you can publish
When you choose a workspace in Desktop and select it, the service runs a short series of checks. The diagram shows the order.
The licensing check, which the next chapter covers, happens alongside this role check. Passing the role check does not guarantee a successful publish.
Roles and the existing semantic model
Publishing creates a report and a semantic model, so a role has to cover both. Two cases come up often.
Overwriting an existing item. When you republish a .pbix file whose name matches an existing report, Desktop asks whether to replace it. Replacing needs write access to the existing items. Admins, Members, and Contributors have it for content in the workspace. A Viewer does not.
Using a model from another workspace. Suppose your report connects live to a semantic model that lives in a different workspace. Your role in the destination workspace lets you publish the report. Your access to the model comes from a different permission, called Build, granted on the model itself. Without Build permission on the source model, you can open the connection in Desktop but the service may refuse the published report or show a blank visual to some users.
Roles and row-level security
Row-level security (RLS) limits which rows of data a user can see. You define RLS roles in Desktop and assign people to them in the service. The word "role" is overloaded here, so keep the two ideas apart:
- Workspace roles (Admin, Member, Contributor, Viewer) decide what a person can do with workspace content.
- RLS roles decide which rows of data a person sees in a report.
The two interact in a way that catches many authors. RLS is enforced only for people who hold the Viewer role, or for people who reach the report without a workspace role. Admins, Members, and Contributors can write to the semantic model, so RLS does not restrict what they see.
This leads to a common mistake. You publish a report with RLS, test it as a Contributor, and see all the data. You conclude RLS is broken. It is not. Use View as in the service to test an RLS role, or sign in with a test account that holds only the Viewer role.
Common errors and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| The workspace is missing from the Desktop publish list | You have no role there, or you hold Viewer | Ask an Admin or Member for Contributor or higher |
| Publish succeeds, but a colleague cannot see the report | The colleague has no workspace role and the report was not shared | Add them as Viewer, or share the report or app |
| Overwrite is blocked | You lack write access to the existing item | Ask for Contributor or higher, or publish under a new name |
| RLS appears to do nothing | You are testing as Admin, Member, or Contributor | Test with **View as** or a Viewer-only account |
| Removed a user, but they still have access | A group still grants a role, or the report was shared directly | Check group membership and item-level sharing |
| Cannot create a workspace | The tenant setting that limits workspace creation is on | Ask a Power BI administrator to create it or grant the right |
Choosing roles in practice
A few decision rules cover most teams:
- Give report authors Contributor. They can publish and republish but cannot change membership.
- Give people who manage the workspace's content and people Member. Limit it, because Members can add others.
- Keep Admin to two or three named people, so the workspace is never orphaned if one person leaves.
- Give people who only consume reports Viewer, or better, share through an app so they have no workspace role at all.
- Assign groups instead of individuals wherever you can.
Separating authors from consumers has a second benefit. A Viewer cannot accidentally overwrite or delete a report, so day-to-day mistakes are limited to the small group who can publish.
Exercise
Priya is a Viewer in the Sales Analytics workspace and is also in a security group that has been given the Contributor role there. She tries to publish a report. Will it work, and why?
Show answer
Yes. When a person has more than one assignment, the highest role applies. The Contributor role from the group overrides her direct Viewer role, and Contributors can publish. To stop her from publishing, you would have to remove her from the group or change the group's role, not just her direct assignment.
Exercise
You publish a report with row-level security, then open it as a Contributor and see every row. A teammate who is a Viewer reports that she sees only her region's rows. Is something wrong? What would you use to test the RLS role yourself?
Show answer
Nothing is wrong. RLS is not enforced for Admins, Members, and Contributors because they can write to the semantic model. The Viewer sees the filtered data, which is the intended behaviour. To test as the role, use View as in the Power BI service, or sign in with a test account that holds only the Viewer role.
Exercise
Write a PowerShell command that gives [email protected] the right to publish reports to a workspace held in the variable $ws, without letting her add other people. Name the role you chose and why.
Show answer
Add-PowerBIWorkspaceUser -Id $ws.Id -UserEmailAddress '[email protected]' -AccessRight Contributor. Contributor can publish and edit content but cannot manage membership. Member would also let her add people, and Viewer could not publish at all.