Introduction
Yesterday we showed how to create a Microsoft Fabric workspace using PowerShell. Today, we will add users to that workspace using the FabricTools module.
Getting the Workspace
Lets see how to get the workspace we created yesterday. We will use the Get-FabricWorkspace
cmdlet to retrieve the workspace details.
|
|
Adding Users to the Workspace
You can add users to the workspace using the Add-FabricWorkspaceRoleAssignment
function. This function allows you to specify the group and the role you want to assign them.
|
|
If you wish to add a user instead of a group, you can change the PrincipalType
to User
and provide the user’s Object ID.
|
|
Viewing the Users Roles in the Workspace
You can view the users and their roles in the workspace using the Get-FabricWorkspaceRoleAssignment
cmdlet.
|
|
Conclusion
In this post, we learned how to add users to a Microsoft Fabric workspace using PowerShell. We used the Add-FabricWorkspaceRoleAssignment
cmdlet to assign roles to users and groups. This allows for easy management of user access within your Fabric workspace.