Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I wanted to set power bi capacity to a specific workspace using this https://api.powerbi.com/v1.0/myorg/admin/capacities/AssignWorkspaces api. I have the request body set as
{
"capacityMigrationAssignments": [
{
"workspacesToAssign": "worspace_id",
"targetCapacityObjectId": "capacity id"
}
]
}
I also tried to pass it as object but doesn't seem to be working. What type of data does capacityMigrationAssignments take and how is the data passed in postman?
Solved! Go to Solution.
Hi @argometrix ,
If you want to assign the provided workspaces to the specified capacity, there're some notes:
Note: The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
Required scope: Tenant.Read.All or Tenant.ReadWrite.All
To set the permissions scope, see Register an app.
This is the example Request:
curl --location --request POST 'https://api.powerbi.com/v1.0/myorg/admin/capacities/AssignWorkspaces' \
--header 'Content-Type: application/json' \
--data-raw '{
"capacityMigrationAssignments": ""
}'
Reference: Power BI REST API v1
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Even I'm facing same issue, How to pass workspace ID and capacity ID. Can you share sample request body?
this is the payload that worked for me:
{
"capacityMigrationAssignments":
[
{
"targetCapacityObjectId": "capacity-id",
"workspacesToAssign": [
"workspace-id"
]
}
]
}
I wanted to set power bi capacity to a specific workspace using this https://api.powerbi.com/v1.0/myorg/admin/capacities/AssignWorkspaces api. I have the request body set as
{
"capacityMigrationAssignments": [
{
"workspacesToAssign": "worspace_id",
"targetCapacityObjectId": "capacity id"
}
]
}
I also tried to pass it as object but doesn't seem to be working. What type of data does capacityMigrationAssignments take and how is the data passed in postman?
Hi @argometrix
This thread is same as https://community.powerbi.com/t5/Service/Powerbi-api-Admin-Capacities-AssignWorkspacesToCapacity/m-p..., they will be merged later, thanks for your understanding.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @argometrix ,
If you want to assign the provided workspaces to the specified capacity, there're some notes:
Note: The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.
Required scope: Tenant.Read.All or Tenant.ReadWrite.All
To set the permissions scope, see Register an app.
This is the example Request:
curl --location --request POST 'https://api.powerbi.com/v1.0/myorg/admin/capacities/AssignWorkspaces' \
--header 'Content-Type: application/json' \
--data-raw '{
"capacityMigrationAssignments": ""
}'
Reference: Power BI REST API v1
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Your solution -clearly- does not address the problem, you keep the capacityMigrationAssignments block empty.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
18 | |
18 | |
13 | |
12 |
User | Count |
---|---|
35 | |
22 | |
21 | |
18 | |
12 |