Remove-PowerBIWorkspaceUser

Removes permissions to a Power BI workspace for the specified user.

Syntax

Remove-PowerBIWorkspaceUser
      [-Scope <PowerBIUserScope>]
      -Id <Guid>
      -UserPrincipalName <String>
      [<CommonParameters>]
Remove-PowerBIWorkspaceUser
      [-Scope <PowerBIUserScope>]
      -UserPrincipalName <String>
      -Workspace <Workspace>
      [<CommonParameters>]

Description

Removes permissions for a specified user to 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:\> Remove-PowerBIWorkspaceUser -Scope Organization -Id 23FCBDBD-A979-45D8-B1C8-6D21E0F4BE50 -UserEmailAddress john@contoso.com

Removes permissions for user john@contoso.com on workspace with ID 23FCBDBD-A979-45D8-B1C8-6D21E0F4BE50 within the caller's organization.

Example 2

PS C:\> Remove-PowerBIWorkspaceUser -Scope Individual -Id 23FCBDBD-A979-45D8-B1C8-6D21E0F4BE50 -UserEmailAddress john@contoso.com

Removes permissions for john@contoso.com on workspace with ID 23FCBDBD-A979-45D8-B1C8-6D21E0F4BE50, which is a workpace the caller owns.

Parameters

-Id

ID of the workspace the user should be removed from.

Type:Guid
Aliases:GroupId, WorkspaceId
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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 removed.

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

-Workspace

The workspace entity to remove the user from.

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

Inputs

None

Outputs

System.Object