azure-cli
azure-cli copied to clipboard
az webapp auth update --action
az webapp auth update --action seem to have different behavior and syntax than stated in the documents. When I look at the docs this is what optional values I can give with the --action flag: "--action accepted values: AllowAnonymous, LoginWithAzureActiveDirectory, LoginWithFacebook, LoginWithGoogle, LoginWithMicrosoftAccount, LoginWithTwitter"
I used the value "LoginWithAzureActiveDirectory" in a script that I use for my Azure DevOps pipeline.
This is the error I get: "ERROR: az webapp auth update: 'LoginWithAzureActiveDirectory' is not a valid value for '--unauthenticated-client-action'. Allowed values: RedirectToLoginPage, AllowAnonymous, RejectWith401, RejectWith404."
I have effort with understanding why the flag is named differently in the error than in the script. Also I dont get why the value is not accepted.
Hope I made my issue clear and you can use my feedback to improve the docs. Sorry if I made a mistake in my understanding of the technology.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: aeb196c8-e408-8563-26ba-5c3ae6e38c48
- Version Independent ID: 5f150c9a-e142-2fd7-fe84-b298dc83fd02
- Content: az webapp auth
- Content Source: latest/docs-ref-autogen/webapp/auth.yml
- Service: app-service
- Sub-service: web-apps
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw
Thank you for your feedback. This has been routed to the support team for assistance.
route to CXP team
@willem-plug-io Thank you for reaching out, we are looking into it. Can you please share your environment details using az --version command? Also if you are not using the latest version of az cli 2.40.0, please upgrade and retry the command.
Thanks Rakesh, Sorry for my delayed response. When running az --version I get the following output:
2022-09-26T09:36:27.5548607Z ============================================================================== 2022-09-26T09:36:27.5548911Z Task : Azure CLI 2022-09-26T09:36:27.5549407Z Description : Run Azure CLI commands against an Azure subscription in a PowerShell Core/Shell script when running on Linux agent or PowerShell/PowerShell Core/Batch script when running on Windows agent. 2022-09-26T09:36:27.5549870Z Version : 2.208.0 2022-09-26T09:36:27.5550092Z Author : Microsoft Corporation 2022-09-26T09:36:27.5550398Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-cli 2022-09-26T09:36:27.5551444Z ============================================================================== 2022-09-26T09:36:27.8269627Z [command]C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd" --version" 2022-09-26T09:36:44.8144608Z azure-cli 2.40.0 2022-09-26T09:36:44.8164221Z 2022-09-26T09:36:44.8257740Z core 2.40.0 2022-09-26T09:36:44.8288627Z telemetry 1.0.8 2022-09-26T09:36:44.8693120Z 2022-09-26T09:36:44.8835825Z Extensions: 2022-09-26T09:36:44.8837168Z azure-devops 0.25.0 2022-09-26T09:36:44.8837447Z 2022-09-26T09:36:44.8837855Z Dependencies: 2022-09-26T09:36:44.8838295Z msal 1.18.0b1 2022-09-26T09:36:44.8838884Z azure-mgmt-resource 21.1.0b1 2022-09-26T09:36:44.8839121Z 2022-09-26T09:36:44.8839652Z Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe' 2022-09-26T09:36:44.8840296Z Extensions directory 'C:\Program Files\Common Files\AzureCliExtensionDirectory' 2022-09-26T09:36:44.8840633Z 2022-09-26T09:36:44.8841197Z Python (Windows) 3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 15:58:59) [MSC v.1929 32 bit (Intel)] 2022-09-26T09:36:44.8841550Z 2022-09-26T09:36:44.8842005Z Legal docs and information: aka.ms/AzureCliLegal 2022-09-26T09:36:44.8842267Z 2022-09-26T09:36:44.8842459Z 2022-09-26T09:36:44.8842846Z Your CLI is up-to-date.
So it seems like the version is not the problem. I run this on a microsoft hosted agent in Azure DevOps
I am looking at the docs of az webapp auth update.
This is in the docs:

And the output I get is this:
unrecognized arguments: --aad-client-id
This seems contradicting, am I right? I really need to make the command "az webapp auth update" work. I hope you are able to help me.
@willem-plug-io Can you share the exact command and parameters you are using, of course not the real values of the parameters
az webapp auth update -g $resourcegroup `
-n $webAppName `
--enabled true `
--action LoginWithAzureActiveDirectory `
--aad-client-id $appId `
--aad-client-secret $appregSecretPassword `
--aad-token-issuer-url "https://sts.windows.net/$tenantId/"
@willem-plug-io I unable to reproduce this issue at our end. Please look at the screenshots below.


Are you able to reproduce this issue if you run in your local machine?
Thanks for the quick follow up. At this moment I am not able to reproduce this, because of several issues. But this helps a lot showing me this command is supposed to work.
If I use the exact command you use I get the following error: "az webapp auth update: 'LoginWithAzureActiveDirectory' is not a valid value for '--unauthenticated-client-action'"
As you might understand I did not use the flag '--unauthenticated-client-action', because I used the same command as you(with my own parameters).
I used this in my AzDevops pipeline. I am not in the position to run this locally at the moment.
Hope this clarifies something.
@willem-plug-io --unauthenticated-client-action seems to be missing in the documentation? It looks like a deprecated feature?
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!