The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
User | Count |
---|---|
36 | |
14 | |
12 | |
11 | |
8 |
User | Count |
---|---|
44 | |
43 | |
19 | |
19 | |
18 |