Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az webapp deploy command fails with 404 #30992

Closed
mikekistler opened this issue Mar 10, 2025 · 3 comments
Closed

az webapp deploy command fails with 404 #30992

mikekistler opened this issue Mar 10, 2025 · 3 comments
Labels
app-service-deployment app-service-general Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. Service Attention This issue is responsible by Azure service team. Web Apps az webapp

Comments

@mikekistler
Copy link
Member

Describe the bug

I'm trying to use the az webapp deploy command to deploy my web app. The help for this command says that the "name" argument is "Name of the webapp to deploy to." I can list my web apps with az webapp list and I only have one web app:

>az webapp list --query "[].name" --output tsv
aspnet-entra-auth-app

But when I use this name in the webapp deploy command it fails with a 404

>az webapp deploy --resource-group mdk-demos --name aspnet-entra-web-app --src-path aspnet-entra-auth-app.zip
(ResourceNotFound) The Resource 'Microsoft.Web/sites/aspnet-entra-web-app' under resource group 'mdk-demos' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.Web/sites/aspnet-entra-web-app' under resource group 'mdk-demos' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix

The link in the error message was no help.

Related command

az webapp deploy

Errors

(ResourceNotFound) The Resource 'Microsoft.Web/sites/aspnet-entra-web-app' under resource group 'mdk-demos' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.Web/sites/aspnet-entra-web-app' under resource group 'mdk-demos' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix

Issue script & Debug output

az webapp deploy --resource-group mdk-demos --name aspnet-entra-web-app --src-path aspnet-entra-auth-app.zip --debug
cli.knack.cli: Command arguments: ['webapp', 'deploy', '--resource-group', 'mdk-demos', '--name', 'aspnet-entra-web-app', '--src-path', 'aspnet-entra-auth-app.zip', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x1048a31a0>, <function OutputProducer.on_global_arguments at 0x104a46480>, <function CLIQuery.on_global_arguments at 0x104a7fc40>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'webapp': ['azure.cli.command_modules.appservice', 'azure.cli.command_modules.serviceconnector']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: appservice 0.283 80 277
cli.azure.cli.core: serviceconnector 0.224 24 374
cli.azure.cli.core: Total (2) 0.507 104 651
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 102 groups, 651 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : webapp deploy
cli.azure.cli.core: Command table: webapp deploy
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x105e9e200>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/mikekistler/.azure/commands/2025-03-09.22-17-20.webapp_deploy.73802.log'.
az_command_data_logger: command args: webapp deploy --resource-group {} --name {} --src-path {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x105ed7920>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x105f31c60>, <function register_cache_arguments..add_cache_arguments at 0x105f31da0>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x105f31e40>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x104a46520>, <function CLIQuery.handle_query_parameter at 0x104a7fce0>, <function register_ids_argument..parse_ids_arguments at 0x105f31d00>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=WebSiteManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='/Users/mikekistler/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /Users/mikekistler/.azure/msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/5692c19c-da54-4047-8c09-ea18ce0efa9f
msal.authority: openid_config("https://login.microsoftonline.com/5692c19c-da54-4047-8c09-ea18ce0efa9f/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/5692c19c-da54-4047-8c09-ea18ce0efa9f/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/5692c19c-da54-4047-8c09-ea18ce0efa9f/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/5692c19c-da54-4047-8c09-ea18ce0efa9f/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/5692c19c-da54-4047-8c09-ea18ce0efa9f/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/5692c19c-da54-4047-8c09-ea18ce0efa9f/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/5692c19c-da54-4047-8c09-ea18ce0efa9f/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/5692c19c-da54-4047-8c09-ea18ce0efa9f/kerberos', 'tenant_region_scope': 'NA', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? None
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_credentials: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: a48a9a94-8017-46b9-bcd0-2eaf78d35ce4
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/774417ad-ece7-4ada-a4a2-c29ef9d57721/resourceGroups/mdk-demos/providers/Microsoft.Web/sites/aspnet-entra-web-app?api-version=2023-01-01'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '2d6a00f2-fd5e-11ef-ae29-4a7e7a0f2e14'
cli.azure.cli.core.sdk.policies: 'CommandName': 'webapp deploy'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--resource-group --name --src-path --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.70.0 (HOMEBREW) azsdk-python-core/1.31.0 Python/3.12.9 (macOS-15.3-arm64-arm-64bit)'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/774417ad-ece7-4ada-a4a2-c29ef9d57721/resourceGroups/mdk-demos/providers/Microsoft.Web/sites/aspnet-entra-web-app?api-version=2023-01-01 HTTP/1.1" 404 221
cli.azure.cli.core.sdk.policies: Response status: 404
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies: 'Content-Length': '221'
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies: 'Expires': '-1'
cli.azure.cli.core.sdk.policies: 'x-ms-failure-cause': 'gateway'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '005bcaa2-4f86-434e-a7b8-92db3ece95bc'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '005bcaa2-4f86-434e-a7b8-92db3ece95bc'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'NORTHCENTRALUS:20250310T031722Z:005bcaa2-4f86-434e-a7b8-92db3ece95bc'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies: 'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: 0BE9B87C5288413083CD92515F652436 Ref B: CH1AA2020620019 Ref C: 2025-03-10T03:17:21Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Mon, 10 Mar 2025 03:17:21 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"error":{"code":"ResourceNotFound","message":"The Resource 'Microsoft.Web/sites/aspnet-entra-web-app' under resource group 'mdk-demos' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 666, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/cli/command_modules/appservice/custom.py", line 7352, in perform_onedeploy_webapp
app = client.web_apps.get(resource_group_name, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 94, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/mgmt/web/v2023_01_01/operations/_web_apps_operations.py", line 16791, in get
map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/core/exceptions.py", line 161, in map_error
raise error
azure.core.exceptions.ResourceNotFoundError: (ResourceNotFound) The Resource 'Microsoft.Web/sites/aspnet-entra-web-app' under resource group 'mdk-demos' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.Web/sites/aspnet-entra-web-app' under resource group 'mdk-demos' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix

cli.azure.cli.core.azclierror: (ResourceNotFound) The Resource 'Microsoft.Web/sites/aspnet-entra-web-app' under resource group 'mdk-demos' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.Web/sites/aspnet-entra-web-app' under resource group 'mdk-demos' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
az_command_data_logger: (ResourceNotFound) The Resource 'Microsoft.Web/sites/aspnet-entra-web-app' under resource group 'mdk-demos' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.Web/sites/aspnet-entra-web-app' under resource group 'mdk-demos' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x105e9e480>]
az_command_data_logger: exit code: 3
cli.main: Command ran in 2.147 seconds (init: 0.246, invoke: 1.901)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 4385 in cache file under /Users/mikekistler/.azure/telemetry/20250309221722268
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/bin/python /opt/homebrew/Cellar/azure-cli/2.70.0/libexec/lib/python3.12/site-packages/azure/cli/telemetry/init.py /Users/mikekistler/.azure /Users/mikekistler/.azure/telemetry/20250309221722268"
telemetry.process: Return from creating process 73832
telemetry.main: Finish creating telemetry upload process.

Expected behavior

It works.

Environment Summary

az --version
azure-cli 2.70.0

core 2.70.0
telemetry 1.1.0

Extensions:
account 0.2.5
apic-extension 1.0.0
azure-devops 1.0.1
azure-iot 0.24.0
baremetal-infrastructure 3.0.0b1
confidentialledger 1.0.0
spring-cloud 3.1.8

Dependencies:
msal 1.31.2b1
azure-mgmt-resource 23.1.1

Python location '/opt/homebrew/Cellar/azure-cli/2.70.0/libexec/bin/python'
Config directory '/Users/mikekistler/.azure'
Extensions directory '/Users/mikekistler/.azure/cliextensions'

Python (Darwin) 3.12.9 (main, Feb 4 2025, 14:38:38) [Clang 16.0.0 (clang-1600.0.26.6)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

@mikekistler mikekistler added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Mar 10, 2025
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 10, 2025

Thank you for opening this issue, we will look into it.

Copy link
Contributor

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

@mikekistler
Copy link
Member Author

Typo! Ugh.

@mikekistler mikekistler closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app-service-deployment app-service-general Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. Service Attention This issue is responsible by Azure service team. Web Apps az webapp
Projects
None yet
Development

No branches or pull requests

6 participants