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 devcenter admin usage list - command fails #6565

Closed
skeeler opened this issue Jul 26, 2023 · 8 comments
Closed

az devcenter admin usage list - command fails #6565

skeeler opened this issue Jul 26, 2023 · 8 comments
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. CXP Attention This issue is handled by CXP team. Dev Box needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue.

Comments

@skeeler
Copy link

skeeler commented Jul 26, 2023

Describe the bug

Ran this command yesterday with the latest version of devcenter extension and it worked fine:

az devcenter admin usage list --location canadacentral

Output: (partial)

[
  {
    "currentValue": 0,
    "limit": 200,
    "name": {
      "value": "devBoxDefinitions"
    },
    "unit": "Count"
  },
  {
    "currentValue": 0,
    "limit": 5,
    "name": {
      "value": "devCenters"
    },
    "unit": "Count"
  },
...

Ran the same command today (no changes, either local workstation or default Azure subscription), and it fails with the following fairly unhelpful error: (subscription GUID altered for privacy)

(ResourceReadFailed) Failed to read resource '/subscriptions/00000000-0000-0000-0000-000000000000/providers/' as resource provider returned either empty or invalid payload
Code: ResourceReadFailed
Message: Failed to read resource '/subscriptions/00000000-0000-0000-0000-000000000000/providers/' as resource provider returned either empty or invalid payload

Here is the devcenter version info (1.0.2, from command line):

az extension show --name devcenter -o table

ExtensionType    Name       Path                                             Version
---------------  ---------  -----------------------------------------------  ---------
whl              devcenter  .azure\cliextensions\devcenter  1.0.2

Related command

az devcenter admin usage list --location canadacentral

Errors

(ResourceReadFailed) Failed to read resource '/subscriptions/00000000-0000-0000-0000-000000000000/providers/' as resource provider returned either empty or invalid payload
Code: ResourceReadFailed
Message: Failed to read resource '/subscriptions/00000000-0000-0000-0000-000000000000/providers/' as resource provider returned either empty or invalid payload

Issue script & Debug output

cli.knack.cli: Command arguments: ['devcenter', 'admin', 'usage', 'list', '--location', 'canadacentral', '--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 0x01DCB4A8>, <function OutputProducer.on_global_arguments at 0x01FCF6E8>, <function CLIQuery.on_global_arguments at 0x01FE9340>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'devcenter': ['azext_devcenter']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: Total (0)                 0.000         0         0
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: devcenter                 0.595        28        85  C:\Users\username\.azure\cliextensions\devcenter
cli.azure.cli.core: Total (1)                 0.595        28        85
cli.azure.cli.core: Loaded 28 groups, 85 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : devcenter admin usage list
cli.azure.cli.core: Command table: devcenter admin usage list
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x0418C460>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\username\.azure\commands\2023-07-26.16-54-50.devcenter_admin_usage_list.28464.log'.
az_command_data_logger: command args: devcenter admin usage list --location {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x041B46A0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x041C45C8>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x041C47C0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x01FCF730>, <function CLIQuery.handle_query_parameter at 0x01FE9388>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x041C4778>]
az_command_data_logger: extension name: devcenter
az_command_data_logger: extension version: 1.0.2
cli.azure.cli.core.auth.persistence: build_persistence: location='C:\\Users\\username\\.azure\\msal_token_cache.bin', encrypt=True
cli.azure.cli.core.auth.binary_cache: load: C:\Users\username\.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: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/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? 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.broker: [MSAL:0001]        INFO    LogTelemetryData:332    Printing Telemetry for Correlation ID: 26457133-4096-4292-b947-90e06195c504
msal.broker: [MSAL:0001]        INFO    LogTelemetryData:340    Key: start_time, Value: 2023-07-26T20:54:51.000Z
msal.broker: [MSAL:0001]        INFO    LogTelemetryData:340    Key: api_name, Value: ReadAccountById
msal.broker: [MSAL:0001]        INFO    LogTelemetryData:340    Key: was_request_throttled, Value: false
msal.broker: [MSAL:0001]        INFO    LogTelemetryData:340    Key: request_duration, Value: 0
msal.broker: [MSAL:0001]        INFO    LogTelemetryData:340    Key: authority_type, Value: Unknown
msal.broker: [MSAL:0001]        INFO    LogTelemetryData:340    Key: msal_version, Value: 1.1.0+local
msal.broker: [MSAL:0001]        INFO    LogTelemetryData:340    Key: correlation_id, Value: 26457133-4096-4292-b947-90e06195c504
msal.broker: [MSAL:0001]        INFO    LogTelemetryData:340    Key: stop_time, Value: 2023-07-26T20:54:51.000Z
msal.broker: [MSAL:0001]        INFO    LogTelemetryData:340    Key: msalruntime_version, Value: 0.13.9
msal.broker: [MSAL:0001]        INFO    LogTelemetryData:340    Key: is_successful, Value: true
msal.broker: [MSAL:0002]        INFO    SetCorrelationId:220    Set correlation ID: 26457133-4096-4292-b947-90e06195c504
msal.broker: [MSAL:0002]        INFO    EnqueueBackgroundRequest:677    The original authority is 'https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000'
msal.broker: [MSAL:0002]        INFO    ModifyAndValidateAuthParameters:199     Authority Realm: 00000000-0000-0000-0000-000000000000
msal.broker: [MSAL:0003]        INFO    IsAccessTokenValid:2428 The access token is expired
msal.broker: [MSAL:0003]        ERROR   ErrorInternalImpl:134   Created an error: 9u8f4, StatusInternal::InteractionRequired, InternalEvent::None, Error Code 0, Context 'No refresh tokens available in the cache, but an account was found on disk. RT likely deleted.'
msal.broker: [MSAL:0003]        WARNING GetPlatformPropertiesFromStorage:1913   No account found in cache.
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:332    Printing Telemetry for Correlation ID: 26457133-4096-4292-b947-90e06195c504
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: start_time, Value: 2023-07-26T20:54:51.000Z
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: api_name, Value: AcquireTokenSilently
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: was_request_throttled, Value: false
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: request_duration, Value: 2531
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: authority_type, Value: AAD
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: access_token_expiry_time, Value: 2023-07-26T22:23:56.000Z
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: read_token, Value: ID|EAT
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: msal_version, Value: 1.1.0+local
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: client_id, Value: 00000000-0000-0000-0000-000000000000
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: correlation_id, Value: 26457133-4096-4292-b947-90e06195c504
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: stop_time, Value: 2023-07-26T20:54:53.000Z
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: msalruntime_version, Value: 0.13.9
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: original_authority, Value: https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: request_eligible_for_broker, Value: true
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: broker_app_used, Value: true
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: additional_query_parameters_count, Value: 0
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: delete_token, Value: AT
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: is_successful, Value: true
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: wam_telemetry, Value: {"x_ms_clitelem":"1,0,0,2430422.1443,","ui_visible":false,"tenant_id":"00000000-0000-0000-0000-000000000000","scope":"https://management.core.windows.net//.default offline_access openid profile","redirect_uri":"ms-appx-web://Microsoft.AAD.BrokerPlugin/00000000-0000-0000-0000-000000000000","provider_id":"https://login.windows.net","http_status":200,"http_event_count":2,"device_join":"aadj","correlation_id":"{26457133-4096-4292-b947-90e06195c504}","client_id":"00000000-0000-0000-0000-000000000000","cache_event_count":0,"broker_version":"10.0.22621.1928","authority":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000","api_error_code":0,"account_join_on_start":"secondary","account_join_on_end":"secondary","account_id":"00000000-0000-0000-0000-000000000000","silent_code":0,"silent_bi_sub_code":0,"silent_message":"","silent_status":0,"is_cached":0}
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: tenant_id, Value: 00000000-0000-0000-0000-000000000000
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: write_token, Value: AT|ID
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:340    Key: authorization_type, Value: WindowsIntegratedAuth
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:345    Printing Execution Flow:
msal.broker: [MSAL:0003]        INFO    LogTelemetryData:353    {"t":"8b2yn","tid":3,"ts":0,"l":2},{"t":"8dqkx","tid":3,"ts":0,"l":2},{"t":"8dqik","tid":3,"ts":0,"l":2},{"t":"8b2ht","tid":3,"ts":0,"l":2},{"t":"7e60d","tid":3,"ts":0,"l":2,"a":2,"ie":0},{"t":"7e60e","tid":3,"ts":0,"l":2,"a":2,"ie":1},{"t":"8dqin","tid":3,"ts":0,"l":2},{"t":"7e60f","tid":3,"ts":0,"l":2,"a":2,"ie":0},{"t":"7e60g","tid":3,"ts":14,"l":2,"a":2,"ie":1},{"t":"7e60l","tid":3,"ts":15,"l":2,"a":4,"ie":0},{"t":"7e60m","tid":3,"ts":18,"l":2,"a":4,"ie":1},{"t":"7e60h","tid":3,"ts":18,"l":2,"a":2,"ie":0},{"t":"7e60i","tid":3,"ts":19,"l":2,"a":2,"ie":1},{"t":"8dqit","tid":3,"ts":19,"l":2},{"t":"8b2hu","tid":3,"ts":19,"l":2},{"t":"5b8fg","tid":3,"ts":27,"l":2},{"t":"8dqk0","tid":3,"ts":27,"l":2},{"t":"7e607","tid":3,"ts":27,"l":2,"a":2,"ie":0},{"t":"7e608","tid":3,"ts":27,"l":2,"a":2,"ie":1},{"t":"8dqjd","tid":3,"ts":27,"l":2},{"t":"694nj","tid":3,"ts":27,"l":2,"a":10,"ie":0},{"t":"4vw1f","tid":3,"ts":27,"l":2},{"t":"4wqnh","tid":3,"ts":27,"l":2},{"t":"4vw1c","tid":3,"ts":54,"l":2},{"t":"4vw1b","tid":3,"ts":54,"l":2},{"t":"4wqnk","tid":3,"ts":54,"l":2},{"t":"6omfm","tid":3,"ts":66,"l":2},{"t":"4vw1a","tid":3,"ts":66,"l":2},{"t":"4wqnf","tid":3,"ts":66,"l":2},{"t":"4wqm5","tid":3,"ts":79,"l":2},{"t":"4wqm6","tid":3,"ts":79,"l":2},{"t":"8dql1","tid":3,"ts":2501,"l":2},{"t":"58yep","tid":3,"ts":2501,"l":2},{"t":"694nk","tid":3,"ts":2501,"l":2,"a":10,"ie":1},{"t":"8dqk1","tid":3,"ts":2501,"l":2},{"t":"8dqlh","tid":3,"ts":2502,"l":2},{"t":"8dqli","tid":3,"ts":2502,"l":2},{"t":"8dqln","tid":3,"ts":2502,"l":2},{"t":"7e60p","tid":3,"ts":2502,"l":2,"a":3,"ie":0},{"t":"7e60q","tid":3,"ts":2516,"l":2,"a":3,"ie":1},{"t":"4zbmt","tid":3,"ts":2516,"l":2},{"t":"4zbmu","tid":3,"ts":2516,"l":2},{"t":"7e60v","tid":3,"ts":2516,"l":2,"a":2,"ie":0},{"t":"7e60w","tid":3,"ts":2517,"l":2,"a":2,"ie":1},{"t":"7e60r","tid":3,"ts":2517,"l":2,"a":3,"ie":0},{"t":"6ou2y","tid":3,"ts":2531,"l":2,"a":3,"ie":1},{"t":"6xuag","tid":3,"ts":2531,"l":2}
msal.token_cache: event={
    "_account_id": "00000000-0000-0000-0000-000000000000",
    "client_id": "00000000-0000-0000-0000-000000000000",
    "data": {},
    "response": {
        "_account_id": "00000000-0000-0000-0000-000000000000",
        "access_token": "********",
        "client_info": "eyJ1aWQiOiIyYWZhNTU1Yy01YWI3LTQ4YWEtYjA1Yi05MzMwOGYyY2Y2MjMiLCJ1dGlkIjoiNDUwMjJlMzAtYWUyNC00NzdlLTk1NTEtMzY3NTc5ZTljOGFlIn0",
        "expires_in": 5343,
        "id_token": "********",
        "id_token_claims": "********",
        "scope": "https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default",
        "token_type": "Bearer"
    },
    "scope": [
        "https://management.core.windows.net//user_impersonation",
        "https://management.core.windows.net//.default"
    ],
    "token_endpoint": "https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token"
}
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/canadacentral/usages?api-version=2023-04-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': 'a96f3daa-2bf6-11ee-903d-6ca1000340bd'
cli.azure.cli.core.sdk.policies:     'CommandName': 'devcenter admin usage list'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--location --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.50.0 (MSI) (AAZ) azsdk-python-core/1.26.0 Python/3.10.10 (Windows-10-10.0.22621-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/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevCenter/locations/canadacentral/usages?api-version=2023-04-01 HTTP/1.1" 404 202
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': '202'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '11999'
cli.azure.cli.core.sdk.policies:     'x-ms-providerhub-traffic': 'True'
cli.azure.cli.core.sdk.policies:     'X-Rate-Limit-Limit': '1m'
cli.azure.cli.core.sdk.policies:     'X-Rate-Limit-Remaining': '299'
cli.azure.cli.core.sdk.policies:     'X-Rate-Limit-Reset': '2023-07-26T20:55:54.4546118Z'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'x-ms-failure-cause': 'gateway'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '857d40d8-6f54-4b1c-80b5-24a99c9a2620'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '81712bdb-c9c5-4ef2-996d-b0102174f210'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'CANADACENTRAL:20230726T205454Z:81712bdb-c9c5-4ef2-996d-b0102174f210'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 26 Jul 2023 20:54:53 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"error":{"code":"ResourceReadFailed","message":"Failed to read resource '/subscriptions/00000000-0000-0000-0000-000000000000/providers/' as resource provider returned either empty or invalid payload"}}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 710, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_paging.py", line 49, in __next__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_paging.py", line 26, in __next__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_command.py", line 244, in executor_wrapper
  File "C:\Users\username\.azure\cliextensions\devcenter\azext_devcenter\aaz\latest\devcenter\admin\usage\_list.py", line 54, in _execute_operations
    self.UsagesListByLocation(ctx=self.ctx)()
  File "C:\Users\username\.azure\cliextensions\devcenter\azext_devcenter\aaz\latest\devcenter\admin\usage\_list.py", line 79, in __call__
    return self.on_error(session.http_response)
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_operation.py", line 329, in on_error
azure.core.exceptions.ResourceNotFoundError: (ResourceReadFailed) Failed to read resource '/subscriptions/00000000-0000-0000-0000-000000000000/providers/' as resource provider returned either empty or invalid payload
Code: ResourceReadFailed
Message: Failed to read resource '/subscriptions/00000000-0000-0000-0000-000000000000/providers/' as resource provider returned either empty or invalid payload

cli.azure.cli.core.azclierror: (ResourceReadFailed) Failed to read resource '/subscriptions/00000000-0000-0000-0000-000000000000/providers/' as resource provider returned either empty or invalid payload
Code: ResourceReadFailed
Message: Failed to read resource '/subscriptions/00000000-0000-0000-0000-000000000000/providers/' as resource provider returned either empty or invalid payload
az_command_data_logger: (ResourceReadFailed) Failed to read resource '/subscriptions/00000000-0000-0000-0000-000000000000/providers/' as resource provider returned either empty or invalid payload
Code: ResourceReadFailed
Message: Failed to read resource '/subscriptions/00000000-0000-0000-0000-000000000000/providers/' as resource provider returned either empty or invalid payload
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x0418C580>]
az_command_data_logger: exit code: 3
cli.__main__: Command ran in 5.779 seconds (init: 1.307, invoke: 4.473)
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 3827 in cache

Expected behavior

This command should return the same JSON output as it did yesterday (shown in the "Describe the bug" field of this issue), since no changes have been made to either the development workstation the command was run from and no changes have been made to the Azure subscription.

Environment Summary

PS> az --version

azure-cli                         2.50.0

core                              2.50.0
telemetry                          1.0.8

Extensions:
account                            0.2.5
azure-devops                      0.26.0
devcenter                          1.0.2

Dependencies:
msal                              1.22.0
azure-mgmt-resource             23.1.0b2

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\skeeler\.azure\cliextensions'

Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:05:00) [MSC v.1929 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.

Additional context

No response

@skeeler skeeler added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jul 26, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Jul 26, 2023

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

@skeeler
Copy link
Author

skeeler commented Jul 26, 2023

Note: I have tried running az account clear to clear any cached tokens, followed by an az login to the tenant, and then tried the az devcenter admin usage list --location canadacentral command again - it still results in the same error.

@yonzhan yonzhan added the CXP Attention This issue is handled by CXP team. label Jul 26, 2023
@microsoft-github-policy-service
Copy link
Contributor

Thank you for your feedback. This has been routed to the support team for assistance.

@jsntcy
Copy link
Member

jsntcy commented Jul 27, 2023

@am-lim, could you please help take a look at this issue?

@skeeler
Copy link
Author

skeeler commented Jul 28, 2023

I tried again this morning, running the same command in the same PowerShell session, within 30 minutes of each other. It succeeded the first time and failed the second time - same session, same default Azure subscription, zero changes by me:

  1. Successful execution: az-devcenter-success
  2. Failed execution: az-devcenter-error

It definitely looks like there is something wrong with the code handling the az devcenter admin usage list command.

@am-lim
Copy link
Contributor

am-lim commented Aug 1, 2023

@skeeler Taking a look

@am-lim
Copy link
Contributor

am-lim commented Aug 1, 2023

@skeeler Can you try running the command with "--debug" and sending the output of a failing response?

@navba-MSFT navba-MSFT added the needs-author-feedback More information is needed from author to address the issue. label Aug 4, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the no-recent-activity There has been no recent activity on this issue. label Aug 11, 2023
@microsoft-github-policy-service
Copy link
Contributor

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. CXP Attention This issue is handled by CXP team. Dev Box needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue.
Projects
None yet
Development

No branches or pull requests

5 participants