cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wpq
New Member

Can't assign a capacity to workspace via API, 401 Unauthorized

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

1 REPLY 1
wpq
New Member

The problem persists, any ideas? 

Helpful resources

Announcements
Winner of T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Find out who won the T-Shirt Design Challenge and the top 3 finalists.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.