question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created 2 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
msftbot[bot]commented, Mar 21, 2022

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.

Issue Details

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’

Author: fslefevre78
Assignees: -
Labels:

Web Apps, Service Attention, customer-reported, Auto-Assign

Milestone: -
0reactions
ulluoinkcommented, Nov 25, 2022

any news?

Read more comments on GitHub >

github_iconTop Results From Across the Web

az webapp auth update unable to set Unauthenticated ...
Hi, I'm trying to set Unauthenticated requests as Return HTTP 404 Not found using below command. az webapp auth update --name <name> ...
Read more >
Unable to set unauthenticatedClientAction with Az module or ...
First, answer your question, to set unauthenticatedClientAction to AllowAnonymous , just use az webapp auth update --name <functionapp-name> ...
Read more >
Is it possible to script the configuration of Azure App Service ...
Here is a detailed way to get a WebApp to use Azure AD for authentication. Ref: az ad app create / az ad...
Read more >
9.1 Ensure App Service Authentication is set on Azure App ...
Using Azure Command Line Interface To set App Service Authentication for an existing app, run the following command: az webapp auth update --resource-group ......
Read more >
Deploy an Azure AD protected App Service Website with Pulumi
This post will walk through how to use Pulumi to deploy an Azure App Service application secured with Easy Auth .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found