az webapp auth-classic
Note
This reference is part of the authV2 extension for the Azure CLI (version 2.23.0 or higher). The extension will automatically install the first time you run an az webapp auth-classic command. Learn more about extensions.
Manage webapp authentication and authorization in the classic format.
Commands
Name | Description | Type | Status |
---|---|---|---|
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-classic show
Show the authentication settings for the webapp in the classic format.
az webapp auth-classic show [--ids]
[--name]
[--resource-group]
[--slot]
[--subscription]
Examples
Show the authentication settings for the webapp. (autogenerated)
az webapp auth-classic show --name MyWebApp --resource-group MyResourceGroup
Optional Parameters
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 of the web app.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of the slot. Default to the productions slot if not specified.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az webapp auth-classic update
Update the authentication settings for the webapp in the classic format.
Note that authentication settings are no longer returned as a result. Please use the az webapp auth-classic show
command to view setting values.
az webapp auth-classic update [--aad-allowed-token-audiences]
[--aad-client-id]
[--aad-client-secret]
[--aad-client-secret-certificate-thumbprint]
[--aad-client-secret-setting-name]
[--aad-token-issuer-url]
[--action {AllowAnonymous, LoginWithAzureActiveDirectory, LoginWithFacebook, LoginWithGoogle, LoginWithMicrosoftAccount, LoginWithTwitter}]
[--allowed-redirect-urls]
[--enabled {false, true}]
[--facebook-app-id]
[--facebook-app-secret]
[--facebook-app-secret-setting-name]
[--facebook-oauth-scopes]
[--github-client-id]
[--github-client-secret]
[--github-client-secret-setting-name]
[--github-oauth-scopes]
[--google-client-id]
[--google-client-secret]
[--google-client-secret-setting-name]
[--google-oauth-scopes]
[--ids]
[--microsoft-account-client-id]
[--microsoft-account-client-secret]
[--microsoft-account-client-secret-setting-name]
[--microsoft-account-oauth-scopes]
[--name]
[--resource-group]
[--runtime-version]
[--slot]
[--subscription]
[--token-refresh-extension-hours]
[--token-store {false, true}]
[--twitter-consumer-key]
[--twitter-consumer-secret]
[--twitter-consumer-secret-setting-name]
Examples
Enable Azure Active Directory by enabling authentication and setting Azure Active Directory-associated parameters. Default provider is set to AAD. Must have created a AAD service principal beforehand.
az webapp auth-classic update -g myResourceGroup --name MyWebApp --enabled true \
--action LoginWithAzureActiveDirectory \
--aad-allowed-token-audiences https://webapp_name.azurewebsites.net/.auth/login/aad/callback \
--aad-client-id my-client-id --aad-client-secret very_secret_password \
--aad-token-issuer-url https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7983a3e9c5a/
Enable Facebook authentication by setting FB-associated parameters and turning on public-profile and email scopes; allow anonymous users
az webapp auth-classic update -g myResourceGroup --name MyWebApp --action AllowAnonymous \
--facebook-app-id my_fb_id --facebook-app-secret my_fb_secret \
--facebook-oauth-scopes public_profile email
Optional Parameters
One or more token audiences (space-delimited).
Application ID to integrate AAD organization account Sign-in into your web app.
AAD application secret.
Alternative to AAD Client Secret, thumbprint of a certificate used for signing purposes.
The app setting name that contains the client secret of the relying party application.
This url can be found in the JSON output returned from your active directory endpoint using your tenantID. The endpoint can be queried from az cloud show
at "endpoints.activeDirectory". The tenantID can be found using az account show
. Get the "issuer" from the JSON at //.well-known/openid-configuration.
The action to take when an unauthenticated client attempts to access the app.
One or more urls (space-delimited).
True if the Authentication / Authorization feature is enabled for the current app; otherwise, false.
Application ID to integrate Facebook Sign-in into your web app.
Facebook Application client secret.
The app setting name that contains the app secret used for Facebook Login.
One or more facebook authentication scopes (space-delimited).
The Client Id of the GitHub app used for login.
The Client Secret of the GitHub app used for login.
The app setting name that contains the client secret of the Github app used for GitHub Login.
The OAuth 2.0 scopes that will be requested as part of GitHub Login authentication.
Application ID to integrate Google Sign-in into your web app.
Google Application client secret.
The app setting name that contains the client secret associated with the Google web application.
One or more Google authentication scopes (space-delimited).
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.
AAD V2 Application ID to integrate Microsoft account Sign-in into your web app.
AAD V2 Application client secret.
The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication.
One or more Microsoft authentification scopes (space-delimited).
Name of the web app.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Runtime version of the Authentication/Authorization feature in use for the current app.
The name of the slot. Default to the productions slot if not specified.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Hours, must be formattable into a float.
Use App Service Token Store.
Application ID to integrate Twitter Sign-in into your web app.
Twitter Application client secret.
The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.