This command fails az webapp auth set -g {resource_group} -n {deployment_name} --body with the json file

Adarsh Shrivastav 20 Reputation points
2024-09-12T06:48:01.98+00:00

Hi, In python, i run this command az webapp auth show -resource-group *** --name ***
and get the auth settings, under validation i have this particular fields.

        validation: {
            jwtClaimChecks:null
    
            defaultAuthorizationPolicy: {
            
              allowedPrincipals: {
              

I have to add new fields and get it to

        validation: {
            jwtClaimChecks:null
            allowedAudiences: []
            defaultAuthorizationPolicy: {
              allowedApplications: []
              allowedPrincipals: {
                identities: 
                groups:

So when i add it and run az webapp auth set -g ***** -n ***** --body auth_settings_json. It always throws me this error unrecognized arguments.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,776 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 21,586 Reputation points
    2024-09-24T07:15:19.8266667+00:00

    @Adarsh Shrivastav Thanks for reply! So to update the authentication settings for the webapp in the v2 format.

    az webapp auth update [--action {AllowAnonymous, RedirectToLoginPage, Return401, Return403, Return404}]
                          [--config-file-path]
                          [--custom-host-header]
                          [--custom-proto-header]
                          [--enable-token-store {false, true}]
                          [--enabled {false, true}]
                          [--excluded-paths]
                          [--ids]
                          [--name]
                          [--proxy-convention {Custom, NoProxy, Standard}]
                          [--redirect-provider]
                          [--require-https {false, true}]
                          [--resource-group]
                          [--runtime-version]
                          [--set]
                          [--slot]
                          [--subscription]
    
    
    
    

    Update the client ID of the AAD provider already configured

    az webapp auth update -g myResourceGroup --name MyWebApp --set identityProviders.azureActiveDirectory.registration.clientId=my-client-id

    Details- https://learn.microsoft.com/en-us/cli/azure/webapp/auth?view=azure-cli-latest#az-webapp-auth-update(authv2)

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.