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

Popular posts from this blog

SOLVED: Exchange Online Management PowerShell Connect-ExchangeOnline bug "A window handle must be configured. See https://aka.ms/msal-net-wam#parent-window-handles"

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

get-windowsfeature : The given key was not present in the dictionary