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

fails on az login: RuntimeError: 0. The ID token is not yet valid. #20696

Closed
diginexus100 opened this issue Dec 11, 2021 · 1 comment
Closed
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. MSAL question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@diginexus100
Copy link

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:
0. The ID token is not yet valid. Current epoch = 1638981987.  The id_token was: {
  "aud": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
  "iss": "https://login.microsoftonline.com/f8cdef31-a31e-4b4a-93e4-5f571e91255a/v2.0",
  "iat": 1639241416,
  "nbf": 1639241416,
  "exp": 1639245316,
  "aio": "AWQAm/8TAAAAzmhiXAw8hhmgP+yiCf4TP8a+wMiDj8CKgbEhZNtmlP+0V0AatcFyXGXXT1oBb63fZf+EvT9/edmHDhmXpjKkjyCwkN0yUvG0I1Cox3oCFl1LkhRWWCmEsKANg+Ffl/kq",
  "idp": "https://sts.windows.net/9188040d-6c67-4c5b-b112-36a304b66dad/",
  "nonce": "5600f1261fc42c54a52709a6574dccc75a716b5671d9e38d91c126e6f69f01f6",
  "preferred_username": "[email protected]",
  "rh": "0.AX0AMe_N-B6jSkuT5F9XHpElWpV3sATbjRpGu-4C-eG_e0YBAIA.",
  "sub": "D6fINvtGV-HZbaK6CRNyEFs7nBXtKtckEIoTonqUOx4",
  "tid": "f8cdef31-a31e-4b4a-93e4-5f571e91255a",
  "uti": "Wrp_ulReUUuC5ESVr_ExAA",
  "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 658, in execute
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 692, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 328, 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 149, in login
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/_profile.py", line 155, in login
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/auth/identity.py", line 147, in login_with_auth_code
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 1546, in acquire_token_interactive
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oidc.py", line 280, 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 135, 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 204, 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 115, 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 581, in <lambda>
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/token_cache.py", line 307, 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 152, in __add
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oidc.py", line 76, in decode_id_token
RuntimeError: 0. The ID token is not yet valid. Current epoch = 1638981987.  The id_token was: {
  "aud": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
  "iss": "https://login.microsoftonline.com/f8cdef31-a31e-4b4a-93e4-5f571e91255a/v2.0",
  "iat": 1639241416,
  "nbf": 1639241416,
  "exp": 1639245316,
  "aio": "AWQAm/8TAAAAzmhiXAw8hhmgP+yiCf4TP8a+wMiDj8CKgbEhZNtmlP+0V0AatcFyXGXXT1oBb63fZf+EvT9/edmHDhmXpjKkjyCwkN0yUvG0I1Cox3oCFl1LkhRWWCmEsKANg+Ffl/kq",
  "idp": "https://sts.windows.net/9188040d-6c67-4c5b-b112-36a304b66dad/",
  "nonce": "5600f1261fc42c54a52709a6574dccc75a716b5671d9e38d91c126e6f69f01f6",
  "preferred_username": "[email protected]",
  "rh": "0.AX0AMe_N-B6jSkuT5F9XHpElWpV3sATbjRpGu-4C-eG_e0YBAIA.",
  "sub": "D6fINvtGV-HZbaK6CRNyEFs7nBXtKtckEIoTonqUOx4",
  "tid": "f8cdef31-a31e-4b4a-93e4-5f571e91255a",
  "uti": "Wrp_ulReUUuC5ESVr_ExAA",
  "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.19041-SP0
Python 3.8.9
Installer: MSI

azure-cli 2.31.0

Additional Context

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Dec 11, 2021
@jiasli
Copy link
Member

jiasli commented Dec 13, 2021

Please see #20388

@jiasli jiasli closed this as completed Dec 13, 2021
@jiasli jiasli added the MSAL label Dec 14, 2021
@jiasli jiasli self-assigned this Dec 14, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Dec 14, 2021
@jiasli jiasli changed the title fails on az login fails on az login: RuntimeError: 0. The ID token is not yet valid. Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. MSAL question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

2 participants