Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Premium capacity methods require caller to be capacity admin?

I need an authenticated user to be able to call these methods:

 

https://docs.microsoft.com/en-us/rest/api/power-bi/capacities/getcapacities

https://docs.microsoft.com/en-us/rest/api/power-bi/capacities/groups_assigntocapacity

 

We have a single capacity set up on which I am the capacity admin.

 

I have no problem calling the required APIs. However my colleague is having trouble. When he calls the get capacities method, he gets back an empty list. When calls the assign to capacity method using a workspace he owns, he gets a PowerBINotAuthorizedException error.

 

As far as I can see, the key difference is that I am a capacity admin and he is not. He is a service admin on the capacity, he has the assignment permission, and he has been assigned the Power BI Service Admin role in AAD. He is able to assign a workspace to the capacity using the portal.

 

Will these methods only work for capacity admins? If so, that seems like a big limitation. Especially since capacity admins can only be specified when a capcacity is being created and cannot be later updated. Perhaps I'm missing something?

1 Reply

  • I think that is an intentional limitation. What is preventing you from adding that person to the capacity admin role?