Using Power Automate to Start, Stop and Restart Azure App Service

Sunday, May 16, 2021| Tags: Power Automate, flow, triggers, Azure App Service

Photo by Linda Eller-Shein from Pexels

There are any number of reasons why you might want to start or stop your Azure App Service based on other factors. And while there are a number of ways to accomplish this, this time we’re going to cover how to do it in Power Automate with the press of a single button.

Whether you want to start, stop or restart you app service, the flow works exactly the same way. As always, we start with a trigger. This time we’re going to use a button trigger so that we can restart our app service at the press of a single button. In Power Automate, create a new instant cloud flow. Give your flow a name and then select “Manually trigger a flow”.

create a new instant flow

create a new instant flow - name and button

We don’t need any inputs to our button trigger. Click “New step” to add an action below the trigger. In the search box, enter Azure app service, and in the actions you should see the three options for restart, start and stop. We’ll select “Restart web app”.

restart web app

If you haven’t signed in to the Azure App Service connector previously, you will be required to enter your credentials. Once you’re signed in, the action requires three pieces of info:

  • Subscription Id
  • Resource Group
  • Web App

You will see dropdowns for these three options to see what you have access to. Select your subscription, resource group and web app.

select app service

That’s it. Really simple at its core. Now, when you open your Power Automate app on your iOS or Android mobile device, you will now see that button added to your buttons screen.

Button added to mobile device

INTERESTED ?

I am available for part time consulting work. If you are looking for someone to help with Power Automate, SQL Server, Azure or .NET work, feel free to contact me.

Contact me