Describe the bug
When am trying to do an az login, it is not working. Default browser is opening with the login prompt and once I login successfully in the terminal am getting following error
The command failed with an unexpected error. Here is the traceback:
Extra data: line 14 column 2 (char 1851)
Related command
az login
Errors
The command failed with an unexpected error. Here is the traceback:
Extra data: line 14 column 2 (char 1851)
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 664, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 334, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/custom.py", line 165, in login
subscriptions = profile.login(
^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/_profile.py", line 172, in login
user_identity = identity.login_with_auth_code(scopes=scopes, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/auth/identity.py", line 163, in login_with_auth_code
result = self._msal_app.acquire_token_interactive(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 2106, in acquire_token_interactive
response = _clean_up(self.client.obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 335, in obtain_token_by_browser
return super(Client, self).obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 642, in obtain_token_by_browser
return self._obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 682, in _obtain_token_by_browser
return self.obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 182, in obtain_token_by_auth_code_flow
return super(_ClientWithCcsRoutingInfo, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 259, in obtain_token_by_auth_code_flow
result = super(Client, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 550, in obtain_token_by_auth_code_flow
return self._obtain_token_by_authorization_code(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 736, in _obtain_token_by_authorization_code
return self._obtain_token("authorization_code", data=data, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 170, in _obtain_token
ret = super(Client, self)._obtain_token(grant_type, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 793, in _obtain_token
(on_obtaining_tokens or self.on_obtaining_tokens)({
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 805, in
on_obtaining_tokens=lambda event: self.token_cache.add(dict(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 390, in add
super(SerializableTokenCache, self).add(event, **kwargs)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 193, in add
return self.__add(event, now=now)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 257, in __add
self.modify(self.CredentialType.ACCESS_TOKEN, at, at)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 64, in modify
self._reload_if_necessary()
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 55, in _reload_if_necessary
self.deserialize(self._persistence.load())
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 402, in deserialize
self._cache = json.loads(state) if state else {}
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 14 column 2 (char 1851)
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
Issue script & Debug output
cli.knack.cli: Command arguments: ['login', '--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 0x102b0b2e0>, <function OutputProducer.on_global_arguments at 0x102e6c680>, <function CLIQuery.on_global_arguments at 0x102e8e160>]
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.026 2 8
cli.azure.cli.core: Total (1) 0.026 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 0x104b72520>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/abeeskhan/.azure/commands/2024-08-12.07-48-16.login.27071.log'.
az_command_data_logger: command args: login --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x104b9ff60>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x104bc3560>, <function register_cache_arguments..add_cache_arguments at 0x104bc36a0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x102e6c720>, <function CLIQuery.handle_query_parameter at 0x102e8e200>, <function register_ids_argument..parse_ids_arguments at 0x104bc3600>]
cli.azure.cli.core.auth.persistence: build_persistence: location='/Users/abeeskhan/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /Users/abeeskhan/.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? None
cli.azure.cli.core.auth.identity: A web browser has been opened at https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with az login --use-device-code.
msal.telemetry: Generate or reuse correlation_id: fd595f16-4303-4841-8ef0-aff7c46d926f
msal.oauth2cli.oauth2: Using http://localhost:60259 as redirect_uri
msal.oauth2cli.authcode: Abort by visit http://localhost:60259?error=abort
msal.oauth2cli.authcode: Open a browser on this device to visit: https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize?client_id=&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A60259&scope=https%3A%2F%2Fmanagement.core.windows.net%2F%2F.default+offline_access+openid+profile&state=LyaUvfcFWVeoCmXn&code_challenge=ErFcr9l0ziALhUMM2sGGyIEIS35GN5kpO_Dw8PLxUXo&code_challenge_method=S256&nonce=a0b1f8c56dab129388b9853c4e9b30ff3d81c289b1cb4e2e972a6d9aa2b8a58c&client_info=1&claims=%7B%22access_token&prompt=select_account
msal.oauth2cli.authcode: Got auth response: {'code': ''}
msal.oauth2cli.authcode: "GET /?code= HTTP/1.1" 200 -
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 200 13427
msal.token_cache: event={
"client_id": "",
"data": {
"claims": "{"access_token": {"xms_cc": {"values": ["CP1"]}}}",
"client_id": "",
"code": "",
"code_verifier": "FdGEOU01YyXf3Lzt5pjrns~.qhbMJNKa2B4TQWlHwAe",
"redirect_uri": "http://localhost:60259",
"scope": [
"https://management.core.windows.net//.default",
"openid",
"profile",
"offline_access"
]
},
"environment": "login.microsoftonline.com",
"grant_type": "authorization_code",
"params": null,
"response": {
"access_token": "",
"client_info": "",
"expires_in": 3980,
"ext_expires_in": 3980,
"foci": "1",
"id_token": "",
"refresh_token": "********",
"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"
}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 664, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 334, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/custom.py", line 165, in login
subscriptions = profile.login(
^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/_profile.py", line 172, in login
user_identity = identity.login_with_auth_code(scopes=scopes, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/auth/identity.py", line 163, in login_with_auth_code
result = self._msal_app.acquire_token_interactive(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 2106, in acquire_token_interactive
response = _clean_up(self.client.obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 335, in obtain_token_by_browser
return super(Client, self).obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 642, in obtain_token_by_browser
return self._obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 682, in _obtain_token_by_browser
return self.obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 182, in obtain_token_by_auth_code_flow
return super(_ClientWithCcsRoutingInfo, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 259, in obtain_token_by_auth_code_flow
result = super(Client, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 550, in obtain_token_by_auth_code_flow
return self._obtain_token_by_authorization_code(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 736, in _obtain_token_by_authorization_code
return self._obtain_token("authorization_code", data=data, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 170, in _obtain_token
ret = super(Client, self)._obtain_token(grant_type, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 793, in _obtain_token
(on_obtaining_tokens or self.on_obtaining_tokens)({
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 805, in
on_obtaining_tokens=lambda event: self.token_cache.add(dict(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 390, in add
super(SerializableTokenCache, self).add(event, **kwargs)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 193, in add
return self.__add(event, now=now)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 257, in __add
self.modify(self.CredentialType.ACCESS_TOKEN, at, at)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 64, in modify
self._reload_if_necessary()
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 55, in _reload_if_necessary
self.deserialize(self._persistence.load())
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 402, in deserialize
self._cache = json.loads(state) if state else {}
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 14 column 2 (char 1851)
cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: Extra data: line 14 column 2 (char 1851)
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 664, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 334, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/custom.py", line 165, in login
subscriptions = profile.login(
^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/_profile.py", line 172, in login
user_identity = identity.login_with_auth_code(scopes=scopes, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/auth/identity.py", line 163, in login_with_auth_code
result = self._msal_app.acquire_token_interactive(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 2106, in acquire_token_interactive
response = _clean_up(self.client.obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 335, in obtain_token_by_browser
return super(Client, self).obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 642, in obtain_token_by_browser
return self._obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 682, in _obtain_token_by_browser
return self.obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 182, in obtain_token_by_auth_code_flow
return super(_ClientWithCcsRoutingInfo, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 259, in obtain_token_by_auth_code_flow
result = super(Client, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 550, in obtain_token_by_auth_code_flow
return self._obtain_token_by_authorization_code(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 736, in _obtain_token_by_authorization_code
return self._obtain_token("authorization_code", data=data, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 170, in _obtain_token
ret = super(Client, self)._obtain_token(grant_type, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 793, in _obtain_token
(on_obtaining_tokens or self.on_obtaining_tokens)({
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 805, in
on_obtaining_tokens=lambda event: self.token_cache.add(dict(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 390, in add
super(SerializableTokenCache, self).add(event, **kwargs)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 193, in add
return self.__add(event, now=now)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 257, in __add
self.modify(self.CredentialType.ACCESS_TOKEN, at, at)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 64, in modify
self._reload_if_necessary()
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 55, in _reload_if_necessary
self.deserialize(self._persistence.load())
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 402, in deserialize
self._cache = json.loads(state) if state else {}
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 14 column 2 (char 1851)
az_command_data_logger: Extra data: line 14 column 2 (char 1851)
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 664, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 334, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/custom.py", line 165, in login
subscriptions = profile.login(
^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/_profile.py", line 172, in login
user_identity = identity.login_with_auth_code(scopes=scopes, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/auth/identity.py", line 163, in login_with_auth_code
result = self._msal_app.acquire_token_interactive(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 2106, in acquire_token_interactive
response = _clean_up(self.client.obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 335, in obtain_token_by_browser
return super(Client, self).obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 642, in obtain_token_by_browser
return self._obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 682, in _obtain_token_by_browser
return self.obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 182, in obtain_token_by_auth_code_flow
return super(_ClientWithCcsRoutingInfo, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 259, in obtain_token_by_auth_code_flow
result = super(Client, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 550, in obtain_token_by_auth_code_flow
return self._obtain_token_by_authorization_code(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 736, in _obtain_token_by_authorization_code
return self._obtain_token("authorization_code", data=data, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 170, in _obtain_token
ret = super(Client, self)._obtain_token(grant_type, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 793, in _obtain_token
(on_obtaining_tokens or self.on_obtaining_tokens)({
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 805, in
on_obtaining_tokens=lambda event: self.token_cache.add(dict(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 390, in add
super(SerializableTokenCache, self).add(event, **kwargs)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 193, in add
return self.__add(event, now=now)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 257, in __add
self.modify(self.CredentialType.ACCESS_TOKEN, at, at)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 64, in modify
self._reload_if_necessary()
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 55, in _reload_if_necessary
self.deserialize(self._persistence.load())
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 402, in deserialize
self._cache = json.loads(state) if state else {}
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 14 column 2 (char 1851)
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x104b727a0>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 11.426 seconds (init: 0.910, invoke: 10.516)
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 7398 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/bin/python /opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/telemetry/init.py /Users/abeeskhan/.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
Expected behavior
Logs in successfully to azure from azure cli
Environment Summary
azure-cli 2.63.0
core 2.63.0
telemetry 1.1.0
Dependencies:
msal 1.30.0
azure-mgmt-resource 23.1.1
Python location '/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/bin/python'
Extensions directory '/Users/abeeskhan/.azure/cliextensions'
Python (Darwin) 3.11.9 (main, Apr 2 2024, 08:25:04) [Clang 15.0.0 (clang-1500.3.9.4)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
This is just happening on macbook. On another machine (windows) it is working as expected and even tried in Docker container, it is working as expected.
Describe the bug
When am trying to do an az login, it is not working. Default browser is opening with the login prompt and once I login successfully in the terminal am getting following error
The command failed with an unexpected error. Here is the traceback:
Extra data: line 14 column 2 (char 1851)
Related command
az login
Errors
The command failed with an unexpected error. Here is the traceback:
Extra data: line 14 column 2 (char 1851)
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 664, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 334, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/custom.py", line 165, in login
subscriptions = profile.login(
^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/_profile.py", line 172, in login
user_identity = identity.login_with_auth_code(scopes=scopes, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/auth/identity.py", line 163, in login_with_auth_code
result = self._msal_app.acquire_token_interactive(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 2106, in acquire_token_interactive
response = _clean_up(self.client.obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 335, in obtain_token_by_browser
return super(Client, self).obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 642, in obtain_token_by_browser
return self._obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 682, in _obtain_token_by_browser
return self.obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 182, in obtain_token_by_auth_code_flow
return super(_ClientWithCcsRoutingInfo, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 259, in obtain_token_by_auth_code_flow
result = super(Client, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 550, in obtain_token_by_auth_code_flow
return self._obtain_token_by_authorization_code(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 736, in _obtain_token_by_authorization_code
return self._obtain_token("authorization_code", data=data, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 170, in _obtain_token
ret = super(Client, self)._obtain_token(grant_type, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 793, in _obtain_token
(on_obtaining_tokens or self.on_obtaining_tokens)({
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 805, in
on_obtaining_tokens=lambda event: self.token_cache.add(dict(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 390, in add
super(SerializableTokenCache, self).add(event, **kwargs)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 193, in add
return self.__add(event, now=now)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 257, in __add
self.modify(self.CredentialType.ACCESS_TOKEN, at, at)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 64, in modify
self._reload_if_necessary()
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 55, in _reload_if_necessary
self.deserialize(self._persistence.load())
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 402, in deserialize
self._cache = json.loads(state) if state else {}
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 14 column 2 (char 1851)
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
Issue script & Debug output
cli.knack.cli: Command arguments: ['login', '--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 0x102b0b2e0>, <function OutputProducer.on_global_arguments at 0x102e6c680>, <function CLIQuery.on_global_arguments at 0x102e8e160>]
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.026 2 8
cli.azure.cli.core: Total (1) 0.026 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 0x104b72520>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/abeeskhan/.azure/commands/2024-08-12.07-48-16.login.27071.log'.
az_command_data_logger: command args: login --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x104b9ff60>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x104bc3560>, <function register_cache_arguments..add_cache_arguments at 0x104bc36a0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x102e6c720>, <function CLIQuery.handle_query_parameter at 0x102e8e200>, <function register_ids_argument..parse_ids_arguments at 0x104bc3600>]
cli.azure.cli.core.auth.persistence: build_persistence: location='/Users/abeeskhan/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /Users/abeeskhan/.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? None
cli.azure.cli.core.auth.identity: A web browser has been opened at https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with
az login --use-device-code.msal.telemetry: Generate or reuse correlation_id: fd595f16-4303-4841-8ef0-aff7c46d926f
msal.oauth2cli.oauth2: Using http://localhost:60259 as redirect_uri
msal.oauth2cli.authcode: Abort by visit http://localhost:60259?error=abort
msal.oauth2cli.authcode: Open a browser on this device to visit: https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize?client_id=&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A60259&scope=https%3A%2F%2Fmanagement.core.windows.net%2F%2F.default+offline_access+openid+profile&state=LyaUvfcFWVeoCmXn&code_challenge=ErFcr9l0ziALhUMM2sGGyIEIS35GN5kpO_Dw8PLxUXo&code_challenge_method=S256&nonce=a0b1f8c56dab129388b9853c4e9b30ff3d81c289b1cb4e2e972a6d9aa2b8a58c&client_info=1&claims=%7B%22access_token&prompt=select_account
msal.oauth2cli.authcode: Got auth response: {'code': ''}
msal.oauth2cli.authcode: "GET /?code= HTTP/1.1" 200 -
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 200 13427
msal.token_cache: event={
"client_id": "",
"data": {
"claims": "{"access_token": {"xms_cc": {"values": ["CP1"]}}}",
"client_id": "",
"code": "",
"code_verifier": "FdGEOU01YyXf3Lzt5pjrns~.qhbMJNKa2B4TQWlHwAe",
"redirect_uri": "http://localhost:60259",
"scope": [
"https://management.core.windows.net//.default",
"openid",
"profile",
"offline_access"
]
},
"environment": "login.microsoftonline.com",
"grant_type": "authorization_code",
"params": null,
"response": {
"access_token": "",
"client_info": "",
"expires_in": 3980,
"ext_expires_in": 3980,
"foci": "1",
"id_token": "",
"refresh_token": "********",
"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"
}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 664, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 334, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/custom.py", line 165, in login
subscriptions = profile.login(
^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/_profile.py", line 172, in login
user_identity = identity.login_with_auth_code(scopes=scopes, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/auth/identity.py", line 163, in login_with_auth_code
result = self._msal_app.acquire_token_interactive(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 2106, in acquire_token_interactive
response = _clean_up(self.client.obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 335, in obtain_token_by_browser
return super(Client, self).obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 642, in obtain_token_by_browser
return self._obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 682, in _obtain_token_by_browser
return self.obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 182, in obtain_token_by_auth_code_flow
return super(_ClientWithCcsRoutingInfo, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 259, in obtain_token_by_auth_code_flow
result = super(Client, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 550, in obtain_token_by_auth_code_flow
return self._obtain_token_by_authorization_code(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 736, in _obtain_token_by_authorization_code
return self._obtain_token("authorization_code", data=data, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 170, in _obtain_token
ret = super(Client, self)._obtain_token(grant_type, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 793, in _obtain_token
(on_obtaining_tokens or self.on_obtaining_tokens)({
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 805, in
on_obtaining_tokens=lambda event: self.token_cache.add(dict(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 390, in add
super(SerializableTokenCache, self).add(event, **kwargs)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 193, in add
return self.__add(event, now=now)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 257, in __add
self.modify(self.CredentialType.ACCESS_TOKEN, at, at)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 64, in modify
self._reload_if_necessary()
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 55, in _reload_if_necessary
self.deserialize(self._persistence.load())
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 402, in deserialize
self._cache = json.loads(state) if state else {}
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 14 column 2 (char 1851)
cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: Extra data: line 14 column 2 (char 1851)
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 664, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 334, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/custom.py", line 165, in login
subscriptions = profile.login(
^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/_profile.py", line 172, in login
user_identity = identity.login_with_auth_code(scopes=scopes, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/auth/identity.py", line 163, in login_with_auth_code
result = self._msal_app.acquire_token_interactive(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 2106, in acquire_token_interactive
response = _clean_up(self.client.obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 335, in obtain_token_by_browser
return super(Client, self).obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 642, in obtain_token_by_browser
return self._obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 682, in _obtain_token_by_browser
return self.obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 182, in obtain_token_by_auth_code_flow
return super(_ClientWithCcsRoutingInfo, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 259, in obtain_token_by_auth_code_flow
result = super(Client, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 550, in obtain_token_by_auth_code_flow
return self._obtain_token_by_authorization_code(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 736, in _obtain_token_by_authorization_code
return self._obtain_token("authorization_code", data=data, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 170, in _obtain_token
ret = super(Client, self)._obtain_token(grant_type, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 793, in _obtain_token
(on_obtaining_tokens or self.on_obtaining_tokens)({
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 805, in
on_obtaining_tokens=lambda event: self.token_cache.add(dict(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 390, in add
super(SerializableTokenCache, self).add(event, **kwargs)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 193, in add
return self.__add(event, now=now)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 257, in __add
self.modify(self.CredentialType.ACCESS_TOKEN, at, at)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 64, in modify
self._reload_if_necessary()
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 55, in _reload_if_necessary
self.deserialize(self._persistence.load())
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 402, in deserialize
self._cache = json.loads(state) if state else {}
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 14 column 2 (char 1851)
az_command_data_logger: Extra data: line 14 column 2 (char 1851)
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 664, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 334, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/profile/custom.py", line 165, in login
subscriptions = profile.login(
^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/_profile.py", line 172, in login
user_identity = identity.login_with_auth_code(scopes=scopes, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/core/auth/identity.py", line 163, in login_with_auth_code
result = self._msal_app.acquire_token_interactive(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 2106, in acquire_token_interactive
response = _clean_up(self.client.obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 335, in obtain_token_by_browser
return super(Client, self).obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 642, in obtain_token_by_browser
return self._obtain_token_by_browser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 682, in _obtain_token_by_browser
return self.obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 182, in obtain_token_by_auth_code_flow
return super(_ClientWithCcsRoutingInfo, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 259, in obtain_token_by_auth_code_flow
result = super(Client, self).obtain_token_by_auth_code_flow(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 550, in obtain_token_by_auth_code_flow
return self._obtain_token_by_authorization_code(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 736, in _obtain_token_by_authorization_code
return self._obtain_token("authorization_code", data=data, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oidc.py", line 170, in _obtain_token
ret = super(Client, self)._obtain_token(grant_type, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/oauth2cli/oauth2.py", line 793, in _obtain_token
(on_obtaining_tokens or self.on_obtaining_tokens)({
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/application.py", line 805, in
on_obtaining_tokens=lambda event: self.token_cache.add(dict(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 390, in add
super(SerializableTokenCache, self).add(event, **kwargs)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 193, in add
return self.__add(event, now=now)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 257, in __add
self.modify(self.CredentialType.ACCESS_TOKEN, at, at)
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 64, in modify
self._reload_if_necessary()
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal_extensions/token_cache.py", line 55, in _reload_if_necessary
self.deserialize(self._persistence.load())
File "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/msal/token_cache.py", line 402, in deserialize
self._cache = json.loads(state) if state else {}
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 14 column 2 (char 1851)
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x104b727a0>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 11.426 seconds (init: 0.910, invoke: 10.516)
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 7398 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/bin/python /opt/homebrew/Cellar/azure-cli/2.63.0/libexec/lib/python3.11/site-packages/azure/cli/telemetry/init.py /Users/abeeskhan/.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
Expected behavior
Logs in successfully to azure from azure cli
Environment Summary
azure-cli 2.63.0
core 2.63.0
telemetry 1.1.0
Dependencies:
msal 1.30.0
azure-mgmt-resource 23.1.1
Python location '/opt/homebrew/Cellar/azure-cli/2.63.0/libexec/bin/python'
Extensions directory '/Users/abeeskhan/.azure/cliextensions'
Python (Darwin) 3.11.9 (main, Apr 2 2024, 08:25:04) [Clang 15.0.0 (clang-1500.3.9.4)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
This is just happening on macbook. On another machine (windows) it is working as expected and even tried in Docker container, it is working as expected.