Forum Discussion
taran42
2 years agoAdvocate 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 ...
- 2 years ago
Hi taran42
You can bulk assign the workpsaces.
- 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. - 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 - 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"
,...
]
}
]
}
- I would first get the capacity ID's. Get Capacities As Admin
blopez11
2 years agoSuper 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.
taran42
2 years agoAdvocate I
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)?
- Wikkleyn_812 years agoSuper User
Hi taran42
You can bulk assign the workpsaces.
- 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. - 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 - 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"
,...
]
}
]
}
- I would first get the capacity ID's. Get Capacities As Admin