Commands › Power BI

Add-PowerBIWorkspaceUser

Power BI MicrosoftPowerBIMgmt Add-*

Gives permissions to a specified user to access a Power BI workspace. Organization scope only allows requests with user principal.

Quick start script

# Add-PowerBIWorkspaceUser — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-PowerBIServiceAccount -ServicePrincipal -CertificateThumbprint $thumb -ApplicationId $appId -Tenant $tenantId

# 2. Run and inspect
Add-PowerBIWorkspaceUser -AccessRight <WorkspaceUserAccessRight> -Id <Guid> -Identifier <String> | Format-List

# 3. Export for evidence / drift tracking
Add-PowerBIWorkspaceUser | Export-Clixml .\PowerBIWorkspaceUser-$(Get-Date -Format yyyyMMdd).xml

Syntax — 4 parameter sets

UserEmailWithId (Default)

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

PrincipalTypeWithId

Add-PowerBIWorkspaceUser [-Scope <PowerBIUserScope>] -Id <Guid> -AccessRight <WorkspaceUserAccessRight>
 -PrincipalType <WorkspaceUserPrincipalType> -Identifier <String> [<CommonParameters>]

UserEmailWithWorkspace

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

PrincipalTypeWithWorkspace

Add-PowerBIWorkspaceUser [-Scope <PowerBIUserScope>] -AccessRight <WorkspaceUserAccessRight>
 -Workspace <Workspace> -PrincipalType <WorkspaceUserPrincipalType> -Identifier <String> [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-AccessRight WorkspaceUserAccessRight yes Permissions to assign to the user.
-Id Guid yes ID of the workspace the user should be added to.
-Identifier String yes 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.
-PrincipalType WorkspaceUserPrincipalType yes The type of the principal to add to the group.
-Scope PowerBIUserScope 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.
-UserPrincipalName String yes User Principal Name (or UPN, commonly an email address) for the user whose permissions need to be added.
-Workspace Workspace yes The workspace entity to add the user to.

Reference facts derived from Microsoft documentation, © Microsoft, licensed MIT; restructured with original guidance by serv365.ai.