When using the Azure Az PowerShell cmdlets you receive the error "Disable-AzContextAutosave : Key not valid for use in specified state."

When using the Azure Az PowerShell cmdlets you receive the error "Disable-AzContextAutosave : Key not valid for use in specified state."

This can be caused by a problem with the file 

%LOCALAPPDATA%\.IdentityService\msal.cache

Renaming the file msal.cache to msal.cache.old seems to resolve this issue.

Comments