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 login fails: RuntimeError: 9. The ID token already expires. #23223

Closed
ghost opened this issue Jul 16, 2022 · 2 comments
Closed

az login fails: RuntimeError: 9. The ID token already expires. #23223

ghost opened this issue Jul 16, 2022 · 2 comments
Assignees
Labels
Account az login/account Auto-Assign Auto assign by bot common issue customer-reported Issues that are reported by GitHub users external to the Azure organization.
Milestone

Comments

@ghost
Copy link

ghost commented Jul 16, 2022

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az login

Errors:

The command failed with an unexpected error. Here is the traceback:
9. The ID token already expires. Make sure your computer's time and time zone are both correct. Current epoch = 1658009412.  The id_token was: {
  "aud": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
  "iss": "https://login.microsoftonline.com/f8cdef31-a31e-4b4a-93e4-5f571e91255a/v2.0",
  "iat": 1657964756,
  "nbf": 1657964756,
  "exp": 1657968656,
  "aio": "AWQAm/8TAAAAohzvkRb+ZAjH07Lih9+eXPaWy8YRb2yZedSe3r9+Lv8hU9Z76a86/3ZosdQa8IXrSU4CTMBHBTP06PIoWMbzGvui/5xUI2pjheX/oy6luwky+Mc2AMYjMsROAw3JyQFh",
  "idp": "https://sts.windows.net/9188040d-6c67-4c5b-b112-36a304b66dad/",
  "nonce": "259d09c3d5c1512b603004b6c9d7b1e7787344a48f8c29d94c97147db0052387",
  "preferred_username": "[email protected]",
  "rh": "0.AVUAMe_N-B6jSkuT5F9XHpElWpV3sATbjRpGu-4C-eG_e0YBADQ.",
  "sub": "LZj65BC8YJ9vjl89ZXA_SmXgWlbtkyITEEI3YhsIjxg",
  "tid": "f8cdef31-a31e-4b4a-93e4-5f571e91255a",
  "uti": "fEvNjn4wSk2In2Tgq7X0AA",
  "ver": "2.0"
}
Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\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\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/profile/custom.py", line 139, in login
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/_profile.py", line 154, in login
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/auth/identity.py", line 141, in login_with_auth_code
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 1608, in acquire_token_interactive
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oidc.py", line 281, in obtain_token_by_browser
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oauth2.py", line 640, in obtain_token_by_browser
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oauth2.py", line 678, in _obtain_token_by_browser
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 138, in obtain_token_by_auth_code_flow
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oidc.py", line 205, in obtain_token_by_auth_code_flow
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oauth2.py", line 548, in obtain_token_by_auth_code_flow
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oauth2.py", line 732, in _obtain_token_by_authorization_code
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oidc.py", line 116, in _obtain_token
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oauth2.py", line 789, in _obtain_token
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 599, in <lambda>
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/token_cache.py", line 310, in add
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/token_cache.py", line 113, in add
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/token_cache.py", line 153, in __add
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oidc.py", line 77, in decode_id_token
RuntimeError: 9. The ID token already expires. Make sure your computer's time and time zone are both correct. Current epoch = 1658009412.  The id_token was: {
  "aud": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
  "iss": "https://login.microsoftonline.com/f8cdef31-a31e-4b4a-93e4-5f571e91255a/v2.0",
  "iat": 1657964756,
  "nbf": 1657964756,
  "exp": 1657968656,
  "aio": "AWQAm/8TAAAAohzvkRb+ZAjH07Lih9+eXPaWy8YRb2yZedSe3r9+Lv8hU9Z76a86/3ZosdQa8IXrSU4CTMBHBTP06PIoWMbzGvui/5xUI2pjheX/oy6luwky+Mc2AMYjMsROAw3JyQFh",
  "idp": "https://sts.windows.net/9188040d-6c67-4c5b-b112-36a304b66dad/",
  "nonce": "259d09c3d5c1512b603004b6c9d7b1e7787344a48f8c29d94c97147db0052387",
  "preferred_username": "[email protected]",
  "rh": "0.AVUAMe_N-B6jSkuT5F9XHpElWpV3sATbjRpGu-4C-eG_e0YBADQ.",
  "sub": "LZj65BC8YJ9vjl89ZXA_SmXgWlbtkyITEEI3YhsIjxg",
  "tid": "f8cdef31-a31e-4b4a-93e4-5f571e91255a",
  "uti": "fEvNjn4wSk2In2Tgq7X0AA",
  "ver": "2.0"
}

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az login

Expected Behavior

Environment Summary

Windows-10-10.0.19042-SP0
Python 3.10.5
Installer: MSI

azure-cli 2.38.0

Additional Context

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Account az login/account labels Jul 16, 2022
@ghost ghost assigned jiasli Jul 16, 2022
@ghost ghost added this to the Backlog milestone Jul 16, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Jul 16, 2022

Duplicate of #20388

@yonzhan yonzhan marked this as a duplicate of #20388 Jul 16, 2022
@yonzhan yonzhan closed this as completed Jul 16, 2022
@jiasli jiasli changed the title azure cli az login fails: RuntimeError: 9. The ID token already expires. Feb 29, 2024
@jiasli
Copy link
Member

jiasli commented Feb 29, 2024

Same root cause as #20388. See #20388 (comment) for the solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Account az login/account Auto-Assign Auto assign by bot common issue customer-reported Issues that are reported by GitHub users external to the Azure organization.
Projects
None yet
Development

No branches or pull requests

2 participants