Skip to content

Add-PowerBIWorkspaceUser doesn't accept 'Viewer' for -AccessRight #177

@SQLvariant

Description

@SQLvariant

When trying to add a user to a Workspace with the Add-PowerBIWorkspaceUser cmdlet, you are unable to assign the 'Viewer' role via the -AccessRight parameter.

Add-PowerBIWorkspaceUser -Workspace (Get-PowerBIWorkspace -Name SomeWorkspace) -UserPrincipalName 'some.user@contoso.com' -AccessRight Viewer

Instead of this working, the following error is returned:

Add-PowerBIWorkspaceUser : Cannot bind parameter 'AccessRight'. Cannot convert value "Viewer" to type "Microsoft.PowerBI.Common.Api.Workspaces.WorkspaceUserAccessRight". 
Error: "Unable to match the identifier name Viewer to a valid enumerator name. Specify one of the following enumerator names and try again:
Member, Admin, Contributor"
At line:1 char:146

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions