Search code examples
windows-subsystem-for-linuxazure-cli

Az login error: "The ID token is not yet valid. Make sure your computer's time and time zone are both correct."


When trying to use az login from WSL2 I got the following error:

The ID token is not yet valid. Make sure your computer's time and time zone are both correct.


Solution

  • I discovered my WSL did not have the same system time as Windows, not sure why, but running sudo hwclock -s fixed this.