Muokkaa

Jaa


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>]
   -Id <Guid>
   -AccessRight <WorkspaceUserAccessRight>
   -PrincipalType <WorkspaceUserPrincipalType>
   -Identifier <String>
   [<CommonParameters>]
Add-PowerBIWorkspaceUser
   [-Scope <PowerBIUserScope>]
   -UserPrincipalName <String>
   -AccessRight <WorkspaceUserAccessRight>
   -Workspace <Workspace>
   [<CommonParameters>]
Add-PowerBIWorkspaceUser
   [-Scope <PowerBIUserScope>]
   -AccessRight <WorkspaceUserAccessRight>
   -Workspace <Workspace>
   -PrincipalType <WorkspaceUserPrincipalType>
   -Identifier <String>
   [<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

Parameters

-AccessRight

Permissions to assign to the user.

Type:WorkspaceUserAccessRight
Aliases:UserAccessRight
Accepted values:Member, Admin, Contributor, Viewer
Position:Named
Default value:None
Required:True
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
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Identifier

Identifier of the principal to add to the group. For Apps and Groups, this will be their object identifier (GUID). For users, this can be an email address.

Type:String
Aliases:PrincipalId
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PrincipalType

The type of the principal to add to the group.

Type:WorkspaceUserPrincipalType
Accepted values:App, Group, User
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-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
Required:False
Accept pipeline input:False
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
Required:True
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
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Object