FabricTools v0.33.0 Public Preview

Update-FabricWorkspaceRoleAssignment

Updates the role assignment for a specific principal in a Fabric workspace.

Syntax

Update-FabricWorkspaceRoleAssignment [-WorkspaceId] <guid> [-WorkspaceRoleAssignmentId] <guid>
 [-WorkspaceRole] <string> [-WhatIf] [-Confirm] [<CommonParameters>]

Description

The Update-FabricWorkspaceRoleAssignment function updates the role assigned to a principal in a workspace by making a PATCH request to the API.

Examples

Example 1

Updates the role assignment to "Admin" for the specified workspace and role assignment.

Update-FabricWorkspaceRoleAssignment -WorkspaceId "workspace123" -WorkspaceRoleAssignmentId "assignment456" -WorkspaceRole "Admin"

Parameters

NameTypeReq.Pos.PipelineDescription
-WorkspaceIdalias: Id guid ✓Required 0 –

The unique identifier of the workspace where the role assignment exists.

-WorkspaceRole string ✓Required 2 –

The new role to assign to the principal. Must be one of the following:

  • Admin
  • Contributor
  • Member
  • Viewer
-WorkspaceRoleAssignmentId guid ✓Required 1 –

The unique identifier of the role assignment to be updated.

-Confirmalias: cf switch Named –

Prompts you for confirmation before running the cmdlet.

-WhatIfalias: wi switch Named –

Runs the command in a mode that only reports what would happen without performing the actions.

This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.

Notes

  • Calls Confirm-TokenState to ensure token validity before making the API request.

Author: Tiago Balabuch, Kamil Nowinski