I have a user, with whom I can assign a capacity on app.powerbi.com/group/id in settings -> premium.
I also have an azure app with all delegated permissions (embed for customer scenario).
I programatically clone the workspace, refresh dataset and the last step should be assigning a capacity for the workspace.
https://api.powerbi.com/v1.0/myorg/capacities returns
{
id": "some id",
displayName": "Premium Per User - Reserved",
admins": [],
sku": "PP3",
state": "Active",
capacityUserAccessRight": "Assign",
region": "North Europe",
users": []
}
But when I use the returned capacity id in body request for this endpoint:
https://api.powerbi.com/v1.0/myorg/groups/my-workspace-id/AssignToCapacity, I get 401 Unauthorized.
What can be the issue here? Running out of ideas
The problem persists, any ideas?