---
title: Restart an Azure App Service
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/azure/azure-appservice-restart
---

The Azure App Service actions let you manage your web apps directly from your workflows.

## Restart an App Service [#azure-appservice-restart]

This action restarts an Azure App Service using the [Web Apps - Restart - REST API](https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/restart?view=rest-appservice-2026-03-15).

### Inputs

| Input field         | Optionality | Type    | Description                                                                                                                                                                                                                                                                                              |
| ------------------- | ----------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `clientId`          | Required    | String  | An Azure Service Principal `clientID`. Must be passed as a secret. See how to [register an Azure app](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/api/register-app-for-token).                                                                                                            |
| `clientSecret`      | Required    | String  | An Azure Service Principal `clientSecret`. Must be passed as a secret. See how to [register an Azure app](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/api/register-app-for-token).                                                                                                        |
| `tenantId`          | Required    | String  | The Azure tenant identifier. Can be passed as a secret.                                                                                                                                                                                                                                                  |
| `subscriptionId`    | Required    | String  | The Azure subscription identifier (for example, `"12345678-1234-1234-1234-123456789abc"`).                                                                                                                                                                                                               |
| `resourceGroupName` | Required    | String  | The name of the resource group that contains the app service. For example, `"my-demo-rg"`.                                                                                                                                                                                                               |
| `appServiceName`    | Required    | String  | The name of the app. For example, `"my-web-app"`.                                                                                                                                                                                                                                                        |
| `softRestart`       | Optional    | Boolean | If `true`, performs a soft restart without recycling the app pool. Default: `false`. By default, the API always restarts and reprovisions the app. For more information, see Azure's [Web Apps](https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/restart?view=rest-appservice-2026-03-15). |
| `synchronous`       | Optional    | Boolean | If `true`, waits for the restart operation to complete before returning. Default: `false`. For more information, see Azure's [Web Apps](https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/restart?view=rest-appservice-2026-03-15).                                                         |
| `selectors`         | Optional    | List    | A list of selectors used to extract specific values from the response. For example, `[{"name": "statusCode", "expression": ".response.status_code"}]`.                                                                                                                                                   |

### Outputs

| Output field        | Type    | Description                                                                                                                                                                             |
| ------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `success`           | Boolean | Indicates whether the action succeeded. Returns `true` or `false`.                                                                                                                      |
| `errorMessage`      | String  | Contains the failure reason as a message.                                                                                                                                               |
| `response`          | Object  | The Azure API body response. For more information, see the [Web Apps](https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/restart?view=rest-appservice-2026-03-15#response). |
| `asyncResponseUrl`  | String  | Optional for long running operation. The URL to poll for status.                                                                                                                        |
| `finalResponseUrl`  | String  | Optional for long running operation. The URL that returns the final result once the operation completes.                                                                                |
| `retryAfterSeconds` | Integer | Optional for long running operation. The number of seconds to wait before polling the async URL.                                                                                        |
| `eTag`              | String  | Optional. Used for concurrency control when updating a resource to avoid overwriting someone else's changes.                                                                            |

### Example

```yaml
name: restartAzureWebService
description: 'This workflow restarts an Azure App Service'
steps:
  - name: azure_appService_restart_1
    type: action
    action: azure.appService.restart
    version: 1
    inputs:
      clientId: ${{ :secrets:azure-client-id }}
      clientSecret: ${{ :secrets:azure-client-secret }}
      tenantId: ${{ :secrets:azure-client-tenant }}
      subscriptionId: "12345678-1234-1234-1234-123456789abc"
      resourceGroupName: "my-resource-group"
      appServiceName: "my-web-app"
      softRestart: true
      synchronous: true
    next: end
```
