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.
id": "some id",
displayName": "Premium Per User - Reserved",
region": "North Europe",
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