This page provides a reference for Azure App Service actions available in the workflow automation actions catalog. These actions let you get, list, start, stop, and restart Azure App Service web applications directly from a workflow definition, enabling operational workflows such as scheduled shutdowns for cost control, incident-triggered restarts, and pre-flight checks before a deploy step.
Prerequisites
Before using Azure App Service actions in workflow automation, ensure you have:
- An Azure subscription with one or more App Services.
- An Entra (Azure AD) app registration (service principal) with the required permissions.
- The app registration credentials stored in the New Relic Secrets Service.
Set up Entra authentication
Azure App Service actions authenticate using an Entra (Azure AD) service-principal client-credentials OAuth2 flow. The required permissions depend on the action:
- Reader role — required for
azure.appService.getandazure.appService.list. - Contributor (or Website Contributor for least privilege) — required for
azure.appService.start,azure.appService.stop, andazure.appService.restart.
Create an Entra app registration
In the Azure portal, go to Microsoft Entra ID > App registrations and click New registration.
Give the registration a name and click Register.
Note the Application (client) ID and Directory (tenant) ID — you'll need these as inputs.
Under Certificates & secrets, create a new client secret and copy the value immediately.
For full instructions, see Register an app to get authentication tokens.
Assign the required role
Assign the app registration the Reader role (for get/list) or Contributor / Website Contributor role (for start/stop/restart) scoped to the target App Service or resource group.
- In the Azure portal, navigate to the target resource group or App Service.
- Go to Access control (IAM) > Add role assignment.
- Select the appropriate role and assign it to the app registration.
Store credentials as secrets
Store the clientId, clientSecret, and tenantId in the New Relic Secrets Service and reference them in your workflow YAML using the ${{ :secrets:keyName }} syntax:
clientId: ${{ :secrets:azure-client-id }}clientSecret: ${{ :secrets:azure-client-secret }}tenantId: ${{ :secrets:azure-client-tenant }}Available Azure App Service actions
The following table lists the available Azure App Service actions and links to their reference pages.
Action name | Description |
|---|---|
Retrieves the details and current state of an Azure App Service web application. | |
Lists Azure App Service web applications in a resource group. | |
Starts a stopped Azure App Service web application. | |
Stops a running Azure App Service web application. | |
Restarts an Azure App Service web application. |