az login fail: The ID token is not yet valid.
See original GitHub issueThis is autogenerated. Please review and update as needed.
Describe the bug
getting this error when trying to log in form Powershell: “0. The ID token is not yet valid. Current epoch = 1641641034. The id_token was: {” this was working fine yesterday and started to fail today after restart.
Command Name
az login
Errors:
Failed to connect to MSI. Please make sure MSI is configured correctly and check the network connection.
Error detail: HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /metadata/identity/oauth2/token?resource=https%3A%2F%2Fmanagement.core.windows.net%2F&api-version=2018-02-01 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x04E5E838>: Failed to establish a new connection: [WinError 10051] A socket operation was attempted to an unreachable network'))
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 --identity
Expected Behavior
Environment Summary
Windows-10-10.0.19041-SP0
Python 3.8.9
Installer: MSI
azure-cli 2.30.0 *
Additional Context
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Can't do `az login`: RuntimeError: 0. The ID token is not yet ...
The command failed with an unexpected error. Here is the traceback: 0. The ID token is not yet valid. Current epoch = 1637158952....
Read more >I am unable to login into azure using my system powershell
AZ CLI Command: az login and below is how it works: It will open the azure portal credential popup dialog box in portal....
Read more >az | Microsoft Learn
Manage logic apps. az login. Log in to Azure. az logout. Log out to remove access to Azure subscriptions.
Read more >Error: building client: unable to obtain access token: running ...
If you still see the error try this command to confirm you have a valid access token (where xxxx is your tenant id):...
Read more >Challenge 0: Request an ID Token from Azure AD
Before we can authenticate a user we have to register an application in our Azure AD tenant. # Azure CLI. az ad app...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just happened to me,
sudo hwclock -s
did the trick. There is a whole discussion on SO (https://stackoverflow.com/questions/65086856/wsl2-clock-is-out-of-sync-with-windows)Clear, I thin I will close the issue then. Cannot replicate it, happened once, most likely it was some time sync issue, after few hours it was working ok. Unless you tell me differently I will close tomorrow.