Add-PowerBIWorkspaceUser

Gives permissions to a specified user to access a Power BI workspace.

Syntax

Add-PowerBIWorkspaceUser
   [-Scope <PowerBIUserScope>]
   -Id <Guid>
   -UserPrincipalName <String>
   -AccessRight <WorkspaceUserAccessRight>
   [<CommonParameters>]
Add-PowerBIWorkspaceUser
   [-Scope <PowerBIUserScope>]
   -UserPrincipalName <String>
   -AccessRight <WorkspaceUserAccessRight>
   -Workspace <Workspace>
   [<CommonParameters>]

Description

Grants permissions to a specified user to access a Power BI workspace using the provided inputs and scope specified. Before you run this command, make sure you log in using Connect-PowerBIServiceAccount.

Examples

Example 1

PS C:\> Add-PowerBIWorkspaceUser -Scope Organization -Id 23FCBDBD-A979-45D8-B1C8-6D21E0F4BE50 -UserEmailAddress john@contoso.com -AccessRight Admin

Required Parameters

-AccessRight

Permissions to assign to the user.

Type:WorkspaceUserAccessRight
Aliases:UserAccessRight
Accepted values:Member, Admin, Contributor
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Id

ID of the workspace the user should be added to.

Type:Guid
Aliases:GroupId, WorkspaceId
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-UserPrincipalName

User Principal Name (or UPN, commonly an email address) for the user whose permissions need to be added.

Type:String
Aliases:UserEmailAddress
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Workspace

The workspace entity to add the user to.

Type:Workspace
Aliases:Group
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Scope

Indicates scope of the call. Individual operates against only workspaces assigned to the caller; Organization operates against all workspaces within a tenant (must be an administrator to initiate). Individual is the default.

Type:PowerBIUserScope
Accepted values:Individual, Organization
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Object