Commands › Power BI

Remove-PowerBIWorkspaceUser

Power BI MicrosoftPowerBIMgmt Remove-*

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

Quick start script

# Remove-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. Capture the current state first — you cannot roll back what you never recorded
$before = Get-PowerBIWorkspaceUser
$before | Format-List

# 3. Make the change
Remove-PowerBIWorkspaceUser -Id <Guid> -UserPrincipalName <String> -Workspace <Workspace>

# 4. Verify and diff
$after = Get-PowerBIWorkspaceUser
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax — 2 parameter sets

Id (Default)

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

Workspace

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

Parameters (4)

ParameterTypeRequiredWhat it controls
-Id Guid yes ID of the workspace the user should be removed from.
-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 removed.
-Workspace Workspace yes The workspace entity to remove the user from.

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