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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
taran42
Advocate I
Advocate I

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.