Forum Discussion
Programatically start/stop Azure PowerBI capacity for PowerBI Embedded
- Anonymous8 years ago
Hi all.
Here is the documentation:
https://docs.microsoft.com/en-us/rest/api/power-bi-embedded/capacities
Here is guide for setting up Postman:
https://www.codit.eu/blog/2017/03/14/authenticate-postman-against-azure-service-management-api/
Wish you well!
Goddamn hate Azure by now though.... hope that changes - 6 years ago
I found the REST api documented here. It seems to be working fine.
Hi,
I'm trying to start/stop Azure Power BI Embedded capacity using the REST API, but it is returning Unauthorized.
When executing the Capacities - Resume API at https://docs.microsoft.com/en-us/rest/api/power-bi-embedded/capacities/resume#code-try-0, it runs successfully, but when I run the same code (see below) in a .NET application it returns an Unauthorized error.
The difference between the application call and the REST API Try It is the access token. If I use the access token generated at the url above in the application, it runs successfully, but if I use the access token that I obtained using the Power BI .NET SDK, then it fails with the Unauthorized error.
Please help, stuck on this problem for a long time.
Thanks,
Ronny
Code:
------
Authorization: Bearer <access_token>
Content-type: application/json