Open Peter2021Devops opened 5 months ago
Thank you for opening this issue, we will look into it.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.
Hello @seligj95, are there any news from your side about this topic? Can I support you somewhere?
Describe the bug
if I run the following command:
az webapp list --subscription msa-xxxxxx --resource-group my_resourcegroup --query "[].{name:name}"
I only get back 58 results. In my environment in the named resource group there are 78 web apps running. Also, if I run the command without the query parameter, same result. Also, If I run the commandaz webapp list --subscription msa-xxxxxx --resource-group my_resourcegroup --query "length(@ )"
I get back 58. On another system with an older az cli version, I get the correct results back.Related command
az webapp list --subscription msa-xxxxxx --resource-group my_resourcegroup --query "length(@ )"
Errors
no error occured. the command finish successful
Issue script & Debug output
PS C:\Users\aaaa.azure> az webapp list --subscription msa-XXXXXX --resource-group my_resourcegroup --query "length(@ )" --debug cli.knack.cli: Command arguments: ['webapp', 'list', '--subscription', 'msa-XXXXXX', '--resource-group', 'my_resourcegroup', '--query', 'length(@ )', '--debug'] cli.knack.cli: init debug log: Enable color in terminal. Enable VT mode. cli.knack.cli: Event: Cli.PreExecute [] cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x032FEA28>, <function OutputProducer.on_global_arguments at 0x03626B18>, <function CLIQuery.on_global_arguments at 0x0364C8E8>] 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.503 79 270 cli.azure.cli.core: serviceconnector 0.668 24 364 cli.azure.cli.core: Total (2) 1.171 103 634 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 101 groups, 634 commands. cli.azure.cli.core: Found a match in the command table. cli.azure.cli.core: Raw command : webapp list cli.azure.cli.core: Command table: webapp list cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x04729208>] cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\aaaa.azure\commands\2024-06-20.15-43-35.webapp_list.15452.log'. az_command_data_logger: command args: webapp list --subscription {} --resource-group {} --query {} --debug cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x0475D438>]
D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\cryptography/hazmat/backends/openssl/backend.py:17: UserWarning: You are using cryptography on a 32-bit Python on a 64-bit Windows Operating System. Cryptography will be significantly faster if you switch to using a 64-bit Python.
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x0486B708>, <function register_cache_arguments..add_cache_arguments at 0x0486B758>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x03626B68>, <function CLIQuery.handle_query_parameter at 0x0364C938>, <function register_ids_argument..parse_ids_arguments at 0x0486B618>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=WebSiteManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\aaaa\.azure\msal_token_cache.bin', encrypt=True
cli.azure.cli.core.auth.binary_cache: load: C:\Users\aaaa.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/xxxxxxx-XXXX-xxxx-xxxx-xxxxxxxxx
msal.authority: openid_config("https://login.microsoftonline.com/xxxxxxx-XXXX-xxxx-xxxx-xxxxxxxxx/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/xxxxxxx-XXXX-xxxx-xxxx-xxxxxxxxx/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/xxxxxxx-XXXX-xxxx-xxxx-xxxxxxxxx/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/xxxxxxx-XXXX-xxxx-xxxx-xxxxxxxxx/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/xxxxxxx-XXXX-xxxx-xxxx-xxxxxxxxx/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/xxxxxxx-XXXX-xxxx-xxxx-xxxxxxxxx/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/xxxxxxx-XXXX-xxxx-xxxx-xxxxxxxxx/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/xxxxxxx-XXXX-xxxx-xxxx-xxxxxxxxx/kerberos', 'tenant_region_scope': 'EU', '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? True
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: 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: 505c154c-6517-4e0f-8b5d-0b46543aa1b0
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx/resourceGroups/my_resourcegroup/providers/Microsoft.Web/sites?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': '16d74f0f-2f0b-11ef-92ef-3822e2361ba4'
cli.azure.cli.core.sdk.policies: 'CommandName': 'webapp list'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--subscription --resource-group --query --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.61.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.19045-SP0)'
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/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx/resourceGroups/my_resourcegroup/providers/Microsoft.Web/sites?api-version=2023-01-01 HTTP/1.1" 200 453343
cli.azure.cli.core.sdk.policies: Response status: 200
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': '453343'
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies: 'Expires': '-1'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '248bf7eb-3b8a-43f9-83c4-ca0bf98f4b32'
cli.azure.cli.core.sdk.policies: 'X-AspNet-Version': '4.0.30319'
cli.azure.cli.core.sdk.policies: 'X-Powered-By': 'ASP.NET'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-reads': '249'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'c2672c93-9996-4125-8b42-1b2937a2dcac'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'GERMANYWESTCENTRAL:20240620T134342Z:c2672c93-9996-4125-8b42-1b2937a2dcac'
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: C83298A907F84EC299291978D40BECA9 Ref B: FRA231050414021 Ref C: 2024-06-20T13:43:38Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Thu, 20 Jun 2024 13:43:41 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {...(removed by me)...}
cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x04755C08>, <function _x509_from_base64_to_hex_transform at 0x04755C58>]
cli.knack.cli: Event: CommandInvoker.OnFilterResult [<function CLIQuery.handle_query_parameter..filter_output at 0x04EB9C08>]
58
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x04729348>]
az_command_data_logger: exit code: 0
cli.main: Command ran in 9.325 seconds (init: 0.923, invoke: 8.401)
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 3672 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry__init__.pyc C:\Users\aaaa.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
PS C:\Users\aaaa.azure>
Expected behavior
got 78 as result back. Instead I got 58 back.
Environment Summary
I tried this on a windows 10 computer. PSVersion 5.1.19041.4412 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.19041.4412 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 azure-cli 2.61.0
core 2.61.0 telemetry 1.1.0
Extensions: account 0.2.5 application-insights 1.0.0 azure-devops 0.26.0 azure-firewall 1.0.0 bastion 0.3.0 communication 1.7.2b1 dns-resolver 0.2.0 guestconfig 0.1.1 import-export 0.1.1 spring 1.15.0
Dependencies: msal 1.28.0 azure-mgmt-resource 23.1.1
Additional context
it worked on older az cli version, but not with the current version