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 app service flow

Create app service flow

New flow - name and button

New 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

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

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 app screenshot

Button app screenshot