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

powershell az login fails every time #23502

Closed
hadagali opened this issue Aug 11, 2022 · 1 comment
Closed

powershell az login fails every time #23502

hadagali opened this issue Aug 11, 2022 · 1 comment
Assignees
Labels
Account az login/account Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization.
Milestone

Comments

@hadagali
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:
9. The ID token already expires. Make sure your computer's time and time zone are both correct. Current epoch = 1660188856.  The id_token was: {
  "aud": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
  "iss": "https://login.microsoftonline.com/f8cdef31-a31e-4b4a-93e4-5f571e91255a/v2.0",
  "iat": 1660177782,
  "nbf": 1660177782,
  "exp": 1660181682,
  "aio": "AWQAm/8TAAAA2wDhsB6crpow2IUP8Zas7LjoOwGNS7Of2Z/WwETJp+/Id3XSozestxzB4bs6qo2AmaZdIvN/4HSq+F9Tv5aHizrcBhOCPDlaFi9217q3z3qKZxj2QxgmseyHM43jlbWY",
  "idp": "https://sts.windows.net/9188040d-6c67-4c5b-b112-36a304b66dad/",
  "preferred_username": "[email protected]",
  "rh": "0.AXwAMe_N-B6jSkuT5F9XHpElWpV3sATbjRpGu-4C-eG_e0YBAGU.",
  "sub": "pWspjZYvsgRj2CY5wTz7bLh12jynOb5oP2MhfhmkCyY",
  "tid": "f8cdef31-a31e-4b4a-93e4-5f571e91255a",
  "uti": "7iOmMG06YE6s_NJDzNTXAA",
  "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 152, in login
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/auth/identity.py", line 152, in login_with_device_code
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 1670, in acquire_token_by_device_flow
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oauth2.py", line 384, in obtain_token_by_device_flow
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/oauth2cli/oauth2.py", line 346, in _obtain_token_by_device_flow
  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 = 1660188856.  The id_token was: {
  "aud": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
  "iss": "https://login.microsoftonline.com/f8cdef31-a31e-4b4a-93e4-5f571e91255a/v2.0",
  "iat": 1660177782,
  "nbf": 1660177782,
  "exp": 1660181682,
  "aio": "AWQAm/8TAAAA2wDhsB6crpow2IUP8Zas7LjoOwGNS7Of2Z/WwETJp+/Id3XSozestxzB4bs6qo2AmaZdIvN/4HSq+F9Tv5aHizrcBhOCPDlaFi9217q3z3qKZxj2QxgmseyHM43jlbWY",
  "idp": "https://sts.windows.net/9188040d-6c67-4c5b-b112-36a304b66dad/",
  "preferred_username": "[email protected]",
  "rh": "0.AXwAMe_N-B6jSkuT5F9XHpElWpV3sATbjRpGu-4C-eG_e0YBAGU.",
  "sub": "pWspjZYvsgRj2CY5wTz7bLh12jynOb5oP2MhfhmkCyY",
  "tid": "f8cdef31-a31e-4b4a-93e4-5f571e91255a",
  "uti": "7iOmMG06YE6s_NJDzNTXAA",
  "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 --use-device-code

Expected Behavior

Environment Summary

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

azure-cli 2.39.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 Aug 11, 2022
@ghost ghost assigned jiasli Aug 11, 2022
@ghost ghost added this to the Backlog milestone Aug 11, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Aug 11, 2022

Duplicate of #23223

@yonzhan yonzhan marked this as a duplicate of #20388 Aug 11, 2022
@yonzhan yonzhan closed this as completed Aug 11, 2022
@yonzhan yonzhan marked this as a duplicate of #23223 Feb 29, 2024
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 customer-reported Issues that are reported by GitHub users external to the Azure organization.
Projects
None yet
Development

No branches or pull requests

3 participants