FabricTools v0.33.0 Public Preview

Add-FabricDomainWorkspaceRoleAssignment

Bulk assigns roles to principals for workspaces in a Fabric domain.

Syntax

Add-FabricDomainWorkspaceRoleAssignment [-DomainId] <guid> [-DomainRole] <string>
 [-PrincipalIds] <array> [<CommonParameters>]

Description

The AssignFabricDomainWorkspaceRoleAssignment function performs bulk role assignments for principals in a specific Fabric domain. It sends a POST request to the relevant API endpoint.

Aliases: Assign-FabricDomainWorkspaceRoleAssignment

Examples

Example 1

Assign the Admins role to the specified principals in the domain with ID "12345".

Assign-FabricDomainWorkspaceRoleAssignment -DomainId "12345" -DomainRole "Admins" -PrincipalIds @(@{id="user1"; type="User"}, @{id="group1"; type="Group"})

Parameters

NameTypeReq.Pos.PipelineDescription
-DomainId guid ✓Required 0 –

The unique identifier of the Fabric domain where roles will be assigned.

-DomainRole string ✓Required 1 –

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

  • Admins
  • Contributors
-PrincipalIds array ✓Required 2 –

An array of principals to assign roles to. Each principal must include:

  • id: The identifier of the principal.
  • type: The type of the principal (e.g., User, Group).

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