Unable to use 'az webapp auth update' to set 'unauthenticatedClientAction'
See original GitHub issue
az feedback
auto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug Unable to update the authentication settings for the webapp in the v2 format (WebApp/FunctionApp). I am trying to set the ‘The action to take when an unauthenticated client attempts to access the app.’ Allowed values: AllowAnonymous, RedirectToLoginPage, RejectWith401, RejectWith404.
When using ‘AllowAnonymous’ and ‘RedirectToLogonPage’ it’s working fine but I need ‘RejectWith401’ or ‘404’. Whatever I do, it always bounces back to ‘RedirectToLogonPage’ (“unauthenticatedClientAction”: “RedirectToLogonPage” )
To Reproduce az webapp auth update --name <FunctionAppName> --resource-group <ResourceGroupName> --unauthenticated-client-action RejectWith401 --enabled true --enable-token-store true
Expected behavior When using the Azure Poral to configure the setting the outcome is: “unauthenticatedClientAction”: “Return401”
Environment summary LOCAL: OS: MacOS Monterey 12.2.1 Shell Type: zsh Azure CLI { “azure-cli”: “2.34.1”, “azure-cli-core”: “2.34.1”, “azure-cli-telemetry”: “1.0.6”, “extensions”: { “application-insights”: “0.1.15”, “authV2”: “0.1.1”, “azure-devops”: “0.23.0” }}
AZURE PIPELINES: OS: ubuntu-latest Shell Type: bash Task Type: AzureCLI@2
Additional context It would make sense to keep ‘Allowed values’ like ‘RejectWith401’ in sync with the actual value which currently is ‘Return401’
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top GitHub Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.
Issue Details
Describe the bug Unable to update the authentication settings for the webapp in the v2 format (WebApp/FunctionApp). I am trying to set the ‘The action to take when an unauthenticated client attempts to access the app.’ Allowed values: AllowAnonymous, RedirectToLoginPage, RejectWith401, RejectWith404.
When using ‘AllowAnonymous’ and ‘RedirectToLogonPage’ it’s working fine but I need ‘RejectWith401’ or ‘404’. Whatever I do, it always bounces back to ‘RedirectToLogonPage’ (“unauthenticatedClientAction”: “RedirectToLogonPage” )
To Reproduce az webapp auth update --name <FunctionAppName> --resource-group <ResourceGroupName> --unauthenticated-client-action RejectWith401 --enabled true --enable-token-store true
Expected behavior When using the Azure Poral to configure the setting the outcome is: “unauthenticatedClientAction”: “Return401”
Environment summary LOCAL: OS: MacOS Monterey 12.2.1 Shell Type: zsh Azure CLI { “azure-cli”: “2.34.1”, “azure-cli-core”: “2.34.1”, “azure-cli-telemetry”: “1.0.6”, “extensions”: { “application-insights”: “0.1.15”, “authV2”: “0.1.1”, “azure-devops”: “0.23.0” }}
AZURE PIPELINES: OS: ubuntu-latest Shell Type: bash Task Type: AzureCLI@2
Additional context It would make sense to keep ‘Allowed values’ like ‘RejectWith401’ in sync with the actual value which currently is ‘Return401’
Web Apps
,Service Attention
,customer-reported
,Auto-Assign
any news?