cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Re: Programatically start/stop Azure PowerBI capacity for PowerBI Embedded

Will look into that. Thanks

Highlighted
Super User II
Super User II

Re: Programatically start/stop Azure PowerBI capacity for PowerBI Embedded

Using PowerShell commands (AzureRM.PowerBIEmbedded) and Azure Runbooks we can also automate things if we want

 

I've published the  runbooks workflow at the below link

https://gallery.technet.microsoft.com/scriptcenter/SuspendResumePBI-Embedded-dd630405

 

Hope this helps,

Jay







Did my reply helpful to you ? Please give Kudos

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Frequent Visitor

Re: Programatically start/stop Azure PowerBI capacity for PowerBI Embedded

Highlighted
Frequent Visitor

Re: Programatically start/stop Azure PowerBI capacity for PowerBI Embedded

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:

------

 

POST https://management.azure.com/subscriptions/<subscription_id>/resourceGroups/<resource_group>/provide...

Authorization: Bearer <access_token>

Content-type: application/json

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.