Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
taran42
Frequent Visitor

Bulk Assign Workspace Capacity

Is there a way I can assign multiple workspaces to a capacity at one time? I have approximately users in multiple countries and I have capacities based on each country. I want to take all users from a specific country and assign them to their respective country. Country isn't something tracked in a personal workspace, but I do have all the names and countries in a spreadsheet.

1 ACCEPTED SOLUTION

Hi @taran42 

You can bulk assign the workpsaces.

  1. I would first get the capacity ID's. Get Capacities As Admin
    https://learn.microsoft.com/en-us/rest/api/power-bi/admin/get-capacities-as-admin
    take the specific Capacity ID you want to assign the workspaces to.
  2. Then get the workpsace ID's and map to your excel document. 
    Groups GetGroupsAsAdmin
    https://learn.microsoft.com/en-us/rest/api/power-bi/admin/groups-get-groups-as-admin
  3.  When you have the workspace ID's and specific Capacity to which you want to assign the workspaces, use the Admin - Capacities AssignWorkspacesToCapacity to assign the workspaces in bulk.
    https://learn.microsoft.com/en-us/rest/api/power-bi/admin/capacities-assign-workspaces-to-capacity
    replace the CapacityID and WorkspacesID's in the script below
    {
    "capacityMigrationAssignments": [
    {
    "targetCapacityObjectId": "CapacityID",
    "workspacesToAssign": [
    "WorkspaceID1"
    ,"WorkspaceID2"
    ,...
    ]
    }
    ]
    }


View solution in original post

5 REPLIES 5
SaiTejaTalasila
Super User
Super User

Hi,

 

Hi,

 

Hi,

 

You can use activity logs (audit logs) and your company's employee table it contains office 365 profile details create a relationship  between 2 tables or apply join (you can check with your tenant admin) to identify the maximum number of users from each country. From this, you can decide.

blopez11
Super User
Super User

Maybe you can write a powershell script that uses your excel file and the power bi cmdlets to reassign workspace capacities: https://learn.microsoft.com/en-us/rest/api/power-bi/capacities/groups-assign-to-capacity

blopez11
Super User
Super User

Yes, if you have the Fabric Administrator role, previously Power BI Administrator role, you can do this in the Admin portal > Workspaces.  Select multiple workspaces, then select Reassign workspace.

Hi blopez11, thank you for the reply. I can do it like this, but I do not know which users belong to which country by just looking in the Workspace list. The Workspace list in the admin settings only shows John Smith. Not that John Smith is in the US. My Excel sheet shows John Smith and that he is in the US. Is there a way to change the Fabric capacity for multiple users at one time by using input from another document (such as an Excel sheet)?

Hi @taran42 

You can bulk assign the workpsaces.

  1. I would first get the capacity ID's. Get Capacities As Admin
    https://learn.microsoft.com/en-us/rest/api/power-bi/admin/get-capacities-as-admin
    take the specific Capacity ID you want to assign the workspaces to.
  2. Then get the workpsace ID's and map to your excel document. 
    Groups GetGroupsAsAdmin
    https://learn.microsoft.com/en-us/rest/api/power-bi/admin/groups-get-groups-as-admin
  3.  When you have the workspace ID's and specific Capacity to which you want to assign the workspaces, use the Admin - Capacities AssignWorkspacesToCapacity to assign the workspaces in bulk.
    https://learn.microsoft.com/en-us/rest/api/power-bi/admin/capacities-assign-workspaces-to-capacity
    replace the CapacityID and WorkspacesID's in the script below
    {
    "capacityMigrationAssignments": [
    {
    "targetCapacityObjectId": "CapacityID",
    "workspacesToAssign": [
    "WorkspaceID1"
    ,"WorkspaceID2"
    ,...
    ]
    }
    ]
    }


Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.