Forum Discussion
Bad request when assigning workspace to the capacity
Hello,
I created the new capacity using rest apis.
And now I want to assigned trial capacity to this using also rest apis:
POST https://api.powerbi.com/v1.0/myorg/groups/{{targetGroupId}}/AssignToCapacity
Authorization: Bearer {{$aadV2Token appOnly}}
Content-Type: application/json; charset=utf-8
{
"capacityId": "{{targetCapacityId}}"
}
and getting:
HTTP/1.1 400 Bad Request
Cache-Control: no-store, must-revalidate, no-cache
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: deny
X-Content-Type-Options: nosniff
RequestId: 52c77ca8-619c-4c1d-b4a2-91945b9b2cf3
Access-Control-Expose-Headers: RequestId
request-redirected: true
home-cluster-uri: https://wabi-us-central-b-primary-redirect.analysis.windows.net/
Date: Wed, 04 Mar 2026 13:57:29 GMT
Connection: close
{
"error": {
"code": "CapacityNotInActiveState",
"pbi.error": {
"code": "CapacityNotInActiveState"
}
}
}
anybody did this making? Maybe trial is not available?
Best,
Jacek
Hi jaryszek,
I havent tried via API but here some thing I would try to figure the issue out based on the error message.
- check if the trial capacity is available in the Fabric UI and can be selected (as error message stating it is not in active state) and assigned to your dedicated workspace.
- check your rights on the respective capacity and workspace if you are allowed to perform this operation
Hope this helps!
Best regards!
PS: If you find this post helpful consider leaving kudos or mark it as solution
1 Reply
- Mauro89Super User
Hi jaryszek,
I havent tried via API but here some thing I would try to figure the issue out based on the error message.
- check if the trial capacity is available in the Fabric UI and can be selected (as error message stating it is not in active state) and assigned to your dedicated workspace.
- check your rights on the respective capacity and workspace if you are allowed to perform this operation
Hope this helps!
Best regards!
PS: If you find this post helpful consider leaving kudos or mark it as solution