Unable to get 'ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS' in profile 'latest' #30822
Labels
AAD
Account
az login/account
Auto-Assign
Auto assign by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Describe the bug
Suddenly unable to use
az login
.Related command
az login
Errors
Retrieving tenants and subscriptions for the selection...
Unable to get 'ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS' in profile 'latest'
Issue script & Debug output
cli.knack.cli: Command arguments: ['login', '--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 0x000002E71EA0B1A0>, <function OutputProducer.on_global_arguments at 0x000002E71EDAC040>, <function CLIQuery.on_global_arguments at 0x000002E71EDD5440>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'login': ['azure.cli.command_modules.profile']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: profile 0.005 2 8
cli.azure.cli.core: Total (1) 0.005 2 8
cli.azure.cli.core: Loaded 2 groups, 8 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : login
cli.azure.cli.core: Command table: login
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000002E7210D1E40>]
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x000002E721135580>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x000002E721135620>, <function register_cache_arguments..add_cache_arguments at 0x000002E721135760>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x000002E721135800>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000002E71EDAC0E0>, <function CLIQuery.handle_query_parameter at 0x000002E71EDD54E0>, <function register_ids_argument..parse_ids_arguments at 0x000002E7211356C0>]
cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\ME\.azure\msal_token_cache.bin', encrypt=True
cli.azure.cli.core.auth.binary_cache: load: C:\Users\ME.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/organizations
msal.authority: openid_config("https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/organizations/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/{tenantid}/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/organizations/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/organizations/kerberos', 'tenant_region_scope': None, '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
msal.application: Falls back to broker._signin_interactively()
cli.azure.cli.core.auth.identity: Select the account you want to log in with. For more information on login with Azure CLI, see https://go.microsoft.com/fwlink/?linkid=2271136
msal.broker: [MSAL:0001] WARNING SetAuthorityUri:78 Initializing authority from URI 'https://login.microsoftonline.com/organizations' without authority type, defaulting to MsSts
msal.broker: [MSAL:0002] INFO SetCorrelationId:258 Set correlation ID: e7c49aa4-be92-4475-b207-3014618dd963
msal.broker: [MSAL:0002] INFO ExecuteInteractiveRequest:1159 The original authority is 'https://login.microsoftonline.com/organizations'
msal.broker: [MSAL:0002] WARNING TryNormalizeRealm:2420 No HomeAccountId provided to normalize the realm
msal.broker: [MSAL:0002] INFO ExecuteInteractiveRequest:1170 The normalized realm is ''
msal.broker: [MSAL:0002] INFO ModifyAndValidateAuthParameters:219 Additional query parameter added successfully. Key: '(pii)' Value: '(pii)'
msal.broker: [MSAL:0002] INFO ModifyAndValidateAuthParameters:219 Additional query parameter added successfully. Key: '(pii)' Value: '(pii)'
msal.broker: [MSAL:0002] INFO ModifyAndValidateAuthParameters:243 Authority Realm: organizations
msal.broker: [MSAL:0002] WARNING TryEnqueueMsaDeviceCredentialAcquisitionAndContinue:1052 MsaDeviceOperationProvider is not available. Not attempting to register the device.
msal.broker: [MSAL:0003] WARNING ReturnResponseDueToMissingParameter:693 Attempted to read cache with a non-normalized realm, access token and ID token reads will fail
msal.broker: [MSAL:0003] WARNING ReadAccountById:227 Account id is empty - account not found
msal.broker: [MSAL:0003] INFO SetCanonicalRealm:1106 Normalize realm to: '0ae51e19-07c8-4e4b-bb6d-648ee58410f4'
msal.broker: [MSAL:0003] INFO LogTelemetryData:422 Printing Telemetry for Correlation ID: e7c49aa4-be92-4475-b207-3014618dd963
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: start_time, Value: 2025-02-13T23:29:13.000Z
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: api_name, Value: SignInInteractively
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: was_request_throttled, Value: false
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: authority_type, Value: AAD
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: access_token_expiry_time, Value: 2025-02-14T00:41:26.000Z
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: msal_version, Value: 1.1.0+local
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: client_id, Value: REDACTED
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: correlation_id, Value: e7c49aa4-be92-4475-b207-3014618dd963
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: broker_app_used, Value: true
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: stop_time, Value: 2025-02-13T23:29:17.000Z
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: msalruntime_version, Value: 0.16.2
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: original_authority, Value: https://login.microsoftonline.com/organizations
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: request_eligible_for_broker, Value: true
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: additional_query_parameters_count, Value: 2
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: read_token_last_error, Value: missing required parameter
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: auth_flow, Value: Broker
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: ui_event_count, Value: 1
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: wam_telemetry, Value: {"x_ms_clitelem":"1,0,0,273932.7318,","ui_visible":false,"tenant_id":"0ae51e19-07c8-4e4b-bb6d-648ee58410f4","scope":"https://management.core.windows.net//.default offline_access openid profile","redirect_uri":"ms-appx-web://Microsoft.AAD.BrokerPlugin/REDACTED","provider_id":"https://login.windows.net","http_status":200,"http_event_count":1,"http_content_type":"application/jose; charset=utf-8","http_content_size":21411,"device_join":"aadj","correlation_id":"{e7c49aa4-be92-4475-b207-3014618dd963}","client_id":"REDACTED","cache_event_count":0,"broker_version":"10.0.22621.4830","authority":"https://login.microsoftonline.com/organizations","api_error_code":0,"account_join_on_start":"primary","account_join_on_end":"primary","account_id":"0cd1376f-5bdc-44dd-9769-137f5c4cfc3b","silent_code":0,"silent_bi_sub_code":0,"silent_message":"","silent_mats":{"x_ms_clitelem":"1,0,0,273932.7318,","ui_visible":false,"tenant_id":"0ae51e19-07c8-4e4b-bb6d-648ee58410f4","scope":"https://management.core.windows.net//.default offline_access openid profile","redirect_uri":"ms-appx-web://Microsoft.AAD.BrokerPlugin/REDACTED","provider_id":"https://login.windows.net","http_status":200,"http_event_count":1,"http_content_type":"application/jose; charset=utf-8","http_content_size":21411,"device_join":"aadj","correlation_id":"{e7c49aa4-be92-4475-b207-3014618dd963}","client_id":"REDACTED","cache_event_count":0,"broker_version":"10.0.22621.4830","authority":"https://login.microsoftonline.com/organizations","api_error_code":0,"account_join_on_start":"primary","account_join_on_end":"primary","account_id":"0cd1376f-5bdc-44dd-9769-137f5c4cfc3b"},"silent_status":0,"is_cached":0}
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: tenant_id, Value: 0ae51e19-07c8-4e4b-bb6d-648ee58410f4
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: normalized_realm, Value: 0ae51e19-07c8-4e4b-bb6d-648ee58410f4
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: write_token, Value: AT|ID
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: storage_write, Value: DAT|DID|DAC
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: storage_read, Value: DAC
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: is_successful, Value: true
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: authorization_type, Value: Interactive
msal.broker: [MSAL:0003] INFO LogTelemetryData:430 Key: request_duration, Value: 4005
msal.broker: [MSAL:0003] INFO LogTelemetryData:435 Printing Execution Flow:
msal.broker: [MSAL:0003] INFO LogTelemetryData:443 {"t":"646u1","tid":2,"ts":0,"l":2},{"t":"4s7ub","tid":2,"ts":1,"l":2},{"t":"4sufd","tid":2,"ts":1,"s":2,"l":2},{"t":"4swgg","tid":2,"ts":1,"s":1,"l":2},{"t":"4swgf","tid":2,"ts":1,"s":1,"l":2},{"t":"4swgi","tid":3,"ts":2,"s":1,"l":2},{"t":"8dqim","tid":3,"ts":2,"l":2},{"t":"8dqkl","tid":3,"ts":2,"l":2,"a":9,"ie":0},{"t":"54uxe","tid":2,"ts":2,"l":2},{"t":"4wqm9","tid":4,"ts":2951,"l":2},{"t":"4o9ak","tid":4,"ts":2951,"l":2},{"t":"4o9ai","tid":4,"ts":2955,"l":2},{"t":"8dql1","tid":4,"ts":3981,"l":2},{"t":"4qopb","tid":4,"ts":3981,"l":2},{"t":"8dqkn","tid":4,"ts":3981,"l":2,"a":5,"ie":1},{"t":"8dqko","tid":4,"ts":3981,"l":2,"a":9,"ie":1},{"t":"8dqkr","tid":4,"ts":3981,"l":2},{"t":"4sufd","tid":4,"ts":3981,"s":2,"l":2},{"t":"4swgg","tid":4,"ts":3981,"s":2,"l":2},{"t":"4swgf","tid":4,"ts":3981,"s":1,"l":2},{"t":"4swgi","tid":3,"ts":3981,"s":2,"l":2},{"t":"8b2yn","tid":3,"ts":3981,"l":2},{"t":"8dqlh","tid":3,"ts":3981,"l":2},{"t":"8dqli","tid":3,"ts":3981,"l":2},{"t":"8dqln","tid":3,"ts":3981,"l":2},{"t":"8dqih","tid":3,"ts":3981,"l":2},{"t":"4qnnm","tid":3,"ts":3982,"l":2,"a":3,"ie":0},{"t":"4qnnl","tid":3,"ts":3990,"l":2,"a":3,"ie":1},{"t":"4qnng","tid":3,"ts":3991,"l":2,"a":2,"ie":0},{"t":"4qnnf","tid":3,"ts":3992,"l":2,"a":2,"ie":1},{"t":"4qnne","tid":3,"ts":3992,"l":2,"a":3,"ie":0},{"t":"4qnnd","tid":3,"ts":3994,"l":2,"a":3,"ie":1},{"t":"6xuag","tid":3,"ts":3998,"l":2},{"t":"4waym","tid":3,"ts":3998,"l":2},{"t":"4pqvy","tid":3,"ts":4001,"l":2}
msal.token_cache: event={
"_account_id": "0cd1376f-5bdc-44dd-9769-137f5c4cfc3b",
"client_id": "REDACTED",
"data": {},
"environment": "login.microsoftonline.com",
"grant_type": "broker",
"response": {
"_account_id": "0cd1376f-5bdc-44dd-9769-137f5c4cfc3b",
"_msalruntime_telemetry": {
"DATA LIMITED": "Full MSALRuntime telemetry not yet implemented",
"api_name": "SignInInteractively",
"broker_app_used": "true",
"client_id": "REDACTED",
"correlation_id": "e7c49aa4-be92-4475-b207-3014618dd963",
"is_successful": "true",
"msal_version": "1.1.0+local",
"msalruntime_version": "0.16.2"
},
"access_token": "",
"client_info": "REDACTED",
"expires_in": 4329,
"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/organizations/oauth2/v2.0/token"
}
Retrieving tenants and subscriptions for the selection...
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/organizations
msal.authority: openid_config("https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/organizations/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/{tenantid}/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/organizations/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/organizations/kerberos', 'tenant_region_scope': None, '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.profiles._shared: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/profiles/_shared.py", line 653, in get_attr
File "importlib_init.py", line 90, in import_module
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 999, in exec_module
File "", line 488, in _call_with_frames_removed
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/resource/init.py", line 9, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/resource/managedapplications/init.py", line 9, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/resource/managedapplications/_application_client.py", line 21, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/resource/managedapplications/_operations_mixin.py", line 16, in
ImportError: bad magic number in 'azure.mgmt.resource.managedapplications.models': b'U\r\r\n'
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 666, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 734, 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 703, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 336, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 120, in handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/profile/custom.py", line 175, in login
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/_profile.py", line 208, in login
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/_profile.py", line 842, in find_using_common_tenant
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/_profile.py", line 933, in _create_subscription_client
azure.cli.core.azclierror.CLIInternalError: Unable to get 'ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS' in profile 'latest'
cli.azure.cli.core.azclierror: Unable to get 'ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS' in profile 'latest'
az_command_data_logger: Unable to get 'ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS' in profile 'latest'
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000002E7210D20C0>]
cli.main: Command ran in 5.214 seconds (init: 0.402, invoke: 4.812)
Expected behavior
Login successfull
Environment Summary
azure-cli 2.69.0
core 2.69.0
telemetry 1.1.0
Dependencies:
msal 1.31.2b1
azure-mgmt-resource N/A
Python location 'C:\Program Files\Microsoft SDKs\AZURE\CLI2\python.exe'
Config directory 'C:\Users\ME.azure'
Extensions directory 'C:\Users\ME.azure\cliextensions'
Python (Windows) 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
I already turned my machine off and on again
I went through:
The text was updated successfully, but these errors were encountered: