I am trying to login to my Azure tenant/subscription using the "az login" command but, suddenly keep getting the following error:
terraform Decryption failed: [WinError -2146893813] Key not valid for use in specified state.
I upgraded Windows 10 to 11 yesterday so I guess probably this issue is related to my OS upgrade?
2
Answers
Actually, I managed to get the issue resolved by deleting 2 files in the .azure folder of my Windows home folder C:UsersMy_UserName .azure. The files I had to delete were the following.
After deleting the above 2 files, I managed to log in to Azure using "az login" again.
After looking at multiple pages all over internet,
Tried all below steps :
az upgrade = Failed. (shows required az cli is up-to-date
az config set core.encrypt_token_cache=false = Failed (Tried to run this command, still did not work)
Tried to delete 2 files in the .azure folder of = Failed
my Windows home folder C:UsersMy_UserName .azure. The files I had to delete were the following.
"msal_http_cache.bin ; msal_token_cache.bin "
After deleting .azure folder in C:UsersMy_UserName .azure, This error got resolved