az webapp

Note

This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.

Manage web apps.

Commands

Name Description Type Status
az webapp auth

Manage webapp authentication and authorization in the v2 format.

Extension GA
az webapp auth-classic

Manage webapp authentication and authorization in the classic format.

Extension GA
az webapp auth-classic show

Show the authentication settings for the webapp in the classic format.

Extension GA
az webapp auth-classic update

Update the authentication settings for the webapp in the classic format.

Extension GA
az webapp auth apple

Manage webapp authentication and authorization of the Apple identity provider.

Extension GA
az webapp auth apple show

Show the authentication settings for the Apple identity provider.

Extension GA
az webapp auth apple update

Update the client id and client secret for the Apple identity provider.

Extension GA
az webapp auth config-version

Manage the state of the configuration version for the authentication settings for the webapp. Configuration version v1 refers to the /authSettings endpoints whereas v2 refers to the /authSettingsV2 endpoints.

Extension GA
az webapp auth config-version revert

Reverts the configuration version of the authentication settings for the webapp from v2 to v1 (classic).

Extension GA
az webapp auth config-version show

Show the configuration version of the authentication settings for the webapp. Configuration version v1 refers to the /authSettings endpoints whereas v2 refers to the /authSettingsV2 endpoints.

Extension GA
az webapp auth config-version upgrade

Upgrades the configuration version of the authentication settings for the webapp from v1 (classic) to v2.

Extension GA
az webapp auth facebook

Manage webapp authentication and authorization of the Facebook identity provider.

Extension GA
az webapp auth facebook show

Show the authentication settings for the Facebook identity provider.

Extension GA
az webapp auth facebook update

Update the app id and app secret for the Facebook identity provider.

Extension GA
az webapp auth github

Manage webapp authentication and authorization of the GitHub identity provider.

Extension GA
az webapp auth github show

Show the authentication settings for the GitHub identity provider.

Extension GA
az webapp auth github update

Update the client id and client secret for the GitHub identity provider.

Extension GA
az webapp auth google

Manage webapp authentication and authorization of the Google identity provider.

Extension GA
az webapp auth google show

Show the authentication settings for the Google identity provider.

Extension GA
az webapp auth google update

Update the client id and client secret for the Google identity provider.

Extension GA
az webapp auth microsoft

Manage webapp authentication and authorization of the Microsoft identity provider.

Extension GA
az webapp auth microsoft show

Show the authentication settings for the Azure Active Directory identity provider.

Extension GA
az webapp auth microsoft update

Update the client id and client secret for the Azure Active Directory identity provider.

Extension GA
az webapp auth openid-connect

Manage webapp authentication and authorization of the custom OpenID Connect identity providers.

Extension GA
az webapp auth openid-connect add

Configure a new custom OpenID Connect identity provider.

Extension GA
az webapp auth openid-connect remove

Removes an existing custom OpenID Connect identity provider.

Extension GA
az webapp auth openid-connect show

Show the authentication settings for the custom OpenID Connect identity provider.

Extension GA
az webapp auth openid-connect update

Update the client id and client secret setting name for an existing custom OpenID Connect identity provider.

Extension GA
az webapp auth set

Sets the authentication settings for the webapp in the v2 format, overwriting any existing settings.

Extension GA
az webapp auth show

Show the authentication settings for the webapp in the v2 format.

Extension GA
az webapp auth twitter

Manage webapp authentication and authorization of the Twitter identity provider.

Extension GA
az webapp auth twitter show

Show the authentication settings for the Twitter identity provider.

Extension GA
az webapp auth twitter update

Update the consumer key and consumer secret for the Twitter identity provider.

Extension GA
az webapp auth update

Update the authentication settings for the webapp in the v2 format.

Extension GA
az webapp config

Configure a web app.

Extension GA
az webapp config ssl

Configure SSL certificates for web apps.

Extension GA
az webapp config ssl bind

Bind an SSL certificate to a web app.

Extension GA
az webapp config ssl unbind

Unbind an SSL certificate from a web app.

Extension GA
az webapp connection

Commands to manage webapp connections.

Core and Extension GA
az webapp connection create

Create a connection between a webapp and a target resource.

Core and Extension GA
az webapp connection create app-insights

Create a webapp connection to app-insights.

Core GA
az webapp connection create appconfig

Create a webapp connection to appconfig.

Core GA
az webapp connection create confluent-cloud

Create a webapp connection to confluent-cloud.

Core GA
az webapp connection create cosmos-cassandra

Create a webapp connection to cosmos-cassandra.

Core GA
az webapp connection create cosmos-gremlin

Create a webapp connection to cosmos-gremlin.

Core GA
az webapp connection create cosmos-mongo

Create a webapp connection to cosmos-mongo.

Core GA
az webapp connection create cosmos-sql

Create a webapp connection to cosmos-sql.

Core GA
az webapp connection create cosmos-table

Create a webapp connection to cosmos-table.

Core GA
az webapp connection create eventhub

Create a webapp connection to eventhub.

Core GA
az webapp connection create keyvault

Create a webapp connection to keyvault.

Core GA
az webapp connection create mysql

Create a webapp connection to mysql.

Core Deprecated
az webapp connection create mysql-flexible

Create a webapp connection to mysql-flexible.

Core GA
az webapp connection create mysql-flexible (serviceconnector-passwordless extension)

Create a webapp connection to mysql-flexible.

Extension GA
az webapp connection create postgres

Create a webapp connection to postgres.

Core Deprecated
az webapp connection create postgres (serviceconnector-passwordless extension)

Create a webapp connection to postgres.

Extension GA
az webapp connection create postgres-flexible

Create a webapp connection to postgres-flexible.

Core GA
az webapp connection create postgres-flexible (serviceconnector-passwordless extension)

Create a webapp connection to postgres-flexible.

Extension GA
az webapp connection create redis

Create a webapp connection to redis.

Core GA
az webapp connection create redis-enterprise

Create a webapp connection to redis-enterprise.

Core GA
az webapp connection create servicebus

Create a webapp connection to servicebus.

Core GA
az webapp connection create signalr

Create a webapp connection to signalr.

Core GA
az webapp connection create sql

Create a webapp connection to sql.

Core GA
az webapp connection create sql (serviceconnector-passwordless extension)

Create a webapp connection to sql.

Extension GA
az webapp connection create storage-blob

Create a webapp connection to storage-blob.

Core GA
az webapp connection create storage-file

Create a webapp connection to storage-file.

Core GA
az webapp connection create storage-queue

Create a webapp connection to storage-queue.

Core GA
az webapp connection create storage-table

Create a webapp connection to storage-table.

Core GA
az webapp connection create webpubsub

Create a webapp connection to webpubsub.

Core GA
az webapp connection delete

Delete a webapp connection.

Core GA
az webapp connection list

List connections of a webapp.

Core GA
az webapp connection list-configuration

List source configurations of a webapp connection.

Core GA
az webapp connection list-support-types

List client types and auth types supported by webapp connections.

Core GA
az webapp connection show

Get the details of a webapp connection.

Core GA
az webapp connection update

Update a webapp connection.

Core GA
az webapp connection update app-insights

Update a webapp to app-insights connection.

Core GA
az webapp connection update appconfig

Update a webapp to appconfig connection.

Core GA
az webapp connection update confluent-cloud

Update a webapp to confluent-cloud connection.

Core GA
az webapp connection update cosmos-cassandra

Update a webapp to cosmos-cassandra connection.

Core GA
az webapp connection update cosmos-gremlin

Update a webapp to cosmos-gremlin connection.

Core GA
az webapp connection update cosmos-mongo

Update a webapp to cosmos-mongo connection.

Core GA
az webapp connection update cosmos-sql

Update a webapp to cosmos-sql connection.

Core GA
az webapp connection update cosmos-table

Update a webapp to cosmos-table connection.

Core GA
az webapp connection update eventhub

Update a webapp to eventhub connection.

Core GA
az webapp connection update keyvault

Update a webapp to keyvault connection.

Core GA
az webapp connection update mysql

Update a webapp to mysql connection.

Core Deprecated
az webapp connection update mysql-flexible

Update a webapp to mysql-flexible connection.

Core GA
az webapp connection update postgres

Update a webapp to postgres connection.

Core Deprecated
az webapp connection update postgres-flexible

Update a webapp to postgres-flexible connection.

Core GA
az webapp connection update redis

Update a webapp to redis connection.

Core GA
az webapp connection update redis-enterprise

Update a webapp to redis-enterprise connection.

Core GA
az webapp connection update servicebus

Update a webapp to servicebus connection.

Core GA
az webapp connection update signalr

Update a webapp to signalr connection.

Core GA
az webapp connection update sql

Update a webapp to sql connection.

Core GA
az webapp connection update storage-blob

Update a webapp to storage-blob connection.

Core GA
az webapp connection update storage-file

Update a webapp to storage-file connection.

Core GA
az webapp connection update storage-queue

Update a webapp to storage-queue connection.

Core GA
az webapp connection update storage-table

Update a webapp to storage-table connection.

Core GA
az webapp connection update webpubsub

Update a webapp to webpubsub connection.

Core GA
az webapp connection validate

Validate a webapp connection.

Core GA
az webapp connection wait

Place the CLI in a waiting state until a condition of the connection is met.

Core GA
az webapp create

Create a web app.

Extension GA
az webapp deployment

Manage web app deployments.

Extension GA
az webapp deployment source

Manage web app deployment via source control.

Extension GA
az webapp deployment source config-zip

Perform deployment using the kudu zip push deployment for a web app.

Extension GA
az webapp list-runtimes

List available built-in stacks which can be used for web apps.

Extension GA
az webapp restart

Restart a web app.

Extension GA
az webapp scale

Modify the number of instances of a webapp on Arc enabled Kubernetes workloads .

Extension GA
az webapp scan

Holds group of commands which cater to webapp scans. Currently available only for Linux based webapps.

Extension GA
az webapp scan list-result

Get details of all scans conducted on webapp, upto max scan limit set on the webapp This will get you the scan log results in addition to the scan status of each scan conducted on the webapp.

Extension GA
az webapp scan show-result

Get results of specified scan-id. This will fetch you the Scan log results of the specified scan-id.

Extension GA
az webapp scan start

Starts the scan on the specified webapp files in the wwwroot directory. It returns a JSON containing the ScanID, traking and results URL.

Extension GA
az webapp scan stop

Stops the current executing scan. Does nothing if no scan is executing.

Extension GA
az webapp scan track

Track status of scan by providing scan-id. You can track the status of the scan from [Starting, Success, Failed, TimeoutFailure, Executing].

Extension GA
az webapp show

Get the details of a web app.

Extension GA
az webapp update

Update an existing web app.

Extension GA

az webapp create

Create a web app.

The web app's name must be able to produce a unique FQDN as AppName.azurewebsites.net.

az webapp create --name
                 --resource-group
                 [--assign-identity]
                 [--custom-location]
                 [--deployment-container-image-name]
                 [--deployment-local-git]
                 [--deployment-source-branch]
                 [--deployment-source-url]
                 [--docker-registry-server-password]
                 [--docker-registry-server-user]
                 [--max-worker-count]
                 [--min-worker-count]
                 [--multicontainer-config-file]
                 [--multicontainer-config-type {COMPOSE, KUBE}]
                 [--plan]
                 [--role]
                 [--runtime]
                 [--scope]
                 [--startup-file]
                 [--tags]

Examples

Create a web app with the default configuration.

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName

Create a web app with a Java 11 runtime using '|' delimiter.

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --runtime "java|11|Java SE|11"

Create a web app with a Java 11 runtime using ':' delimiter.

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --runtime "java:11:Java SE:11"

Create a web app with a NodeJS 10.14 runtime and deployed from a local git repository.

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --runtime "node|10.14" --deployment-local-git

Create a web app with an image from DockerHub.

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName -i nginx

Create a web app with an image from a private DockerHub registry.

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName -i MyImageName -s username -w password

Create a web app with an image from a private Azure Container Registry.

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName -i myregistry.azurecr.io/docker-image:tag

create a WebApp using shared App Service Plan that is in a different resource group.

AppServicePlanID=$(az appservice plan show -n SharedAppServicePlan -g MyASPRG --query "id" --out tsv) az webapp create -g MyResourceGroup -p "$AppServicePlanID" -n MyUniqueAppName

create a WebApp in an appservice kubernetes environment

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --custom-location /subscriptions/sub_id/resourcegroups/group_name/providers/microsoft.extendedlocation/customlocations/custom_location_name

create a WebApp in an appservice kubernetes environment and in the same resource group as the custom location

az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --custom-location custom_location_name

Required Parameters

--name -n

Name of the new web app.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--assign-identity

Accept system or user assigned identities separated by spaces. Use '[system]' to refer system assigned identity, or a resource id to refer user assigned identity. Check out help for more examples.

--custom-location

Name or ID of the custom location. Use an ID for a custom location in a different resource group from the app.

--deployment-container-image-name -i

Linux only. Container image name from Docker Hub, e.g. publisher/image-name:tag.

--deployment-local-git -l

Enable local git.

--deployment-source-branch -b

The branch to deploy.

default value: master
--deployment-source-url -u

Git repository URL to link with manual integration.

--docker-registry-server-password -w

The container registry server password. Required for private registries.

--docker-registry-server-user -s

The container registry server username.

--max-worker-count
Preview

Maximum number of workers to be allocated.

--min-worker-count
Preview

Minimum number of workers to be allocated.

--multicontainer-config-file

Linux only. Config file for multicontainer apps. (local or remote).

--multicontainer-config-type

Linux only.

accepted values: COMPOSE, KUBE
--plan -p

Name or resource id of the app service plan. Use 'appservice plan create' to get one.

--role

Role name or id the system assigned identity will have.

default value: Contributor
--runtime -r

Canonicalized web runtime in the format of Framework|Version, e.g. "PHP|5.6". Use az webapp list-runtimes for available list.

--scope

Scope that the system assigned identity can access.

--startup-file

Linux only. The web's startup file.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az webapp list-runtimes

List available built-in stacks which can be used for web apps.

az webapp list-runtimes [--is-kube]
                        [--linux]
                        [--os {linux, windows}]

Optional Parameters

--is-kube
Preview

Limit the output for app service on azure arc.

default value: False
--linux
Deprecated

Argument 'linux' has been deprecated and will be removed in a future release. Use '--os-type' instead.

List runtime stacks for linux based web apps.

default value: False
--os --os-type

Limit the output to just windows or linux runtimes.

accepted values: linux, windows
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az webapp restart

Restart a web app.

az webapp restart [--ids]
                  [--name]
                  [--resource-group]
                  [--slot]
                  [--subscription]

Examples

Restart a web app. (autogenerated)

az webapp restart --name MyWebapp --resource-group MyResourceGroup

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the web app. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az webapp scale

Modify the number of instances of a webapp on Arc enabled Kubernetes workloads .

az webapp scale --instance-count
                [--ids]
                [--name]
                [--resource-group]
                [--slot]
                [--subscription]

Examples

Change the number of instances of MyApp to 2.

az webapp scale -g MyResourceGroup -n MyApp --instance-count 2

Required Parameters

--instance-count

Number of instances.

default value: 1

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the web app. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az webapp show

Get the details of a web app.

az webapp show [--ids]
               [--name]
               [--resource-group]
               [--slot]
               [--subscription]

Examples

Get the details of a web app. (autogenerated)

az webapp show --name MyWebapp --resource-group MyResourceGroup

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the web app. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az webapp update

Update an existing web app.

az webapp update [--add]
                 [--client-affinity-enabled {false, true}]
                 [--force-string]
                 [--https-only {false, true}]
                 [--ids]
                 [--minimum-elastic-instance-count]
                 [--name]
                 [--prewarmed-instance-count]
                 [--remove]
                 [--resource-group]
                 [--set]
                 [--slot]
                 [--subscription]

Examples

Update the tags of a web app.

az webapp update -g MyResourceGroup -n MyAppName --set tags.tagName=tagValue

Update a web app. (autogenerated)

az webapp update --https-only true --name MyAppName --resource-group MyResourceGroup

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

default value: []
--client-affinity-enabled

Enables sending session affinity cookies.

accepted values: false, true
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

default value: False
--https-only

Redirect all traffic made to an app using HTTP to HTTPS.

accepted values: false, true
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--minimum-elastic-instance-count -i
Preview

Minimum number of instances. App must be in an elastic scale App Service Plan.

--name -n

Name of the web app. You can configure the default using az configure --defaults web=<name>.

--prewarmed-instance-count -w
Preview

Number of preWarmed instances. App must be in an elastic scale App Service Plan.

--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

default value: []
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

default value: []
--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.