skip to Main Content

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


  1. Chosen as BEST ANSWER

    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.

    1. msal_http_cache.bin
    2. msal_token_cache.bin

    After deleting the above 2 files, I managed to log in to Azure using "az login" again.


  2. After looking at multiple pages all over internet,

    Tried all below steps :

    1. az upgrade = Failed. (shows required az cli is up-to-date

    2. az config set core.encrypt_token_cache=false = Failed (Tried to run this command, still did not work)

    3. 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 "

    4. After deleting .azure folder in C:UsersMy_UserName .azure, This error got resolved

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search