Recently I changed my Azure login to use my organisational account rather than a Microsoft account for a particular subscription. Following this I found I was unable to access the subscription via PowerShell.
Running the cmdlet "Get-AzSubscription" (or "Get-AzureRmSubscription" if you use the older command set) returned the information for most of my subscriptions but threw the following warning for the subscription where my login had been changed;
WARNING: Unable to acquire token for tenant 'x''After some investigation I found that my old credentials were cached in the context. Running the following cmdlet cleared this cache and allowed the subscription to be access via PowerShell again;
(or Clear-AzureRmContext with the older cmdlets)
You can disable this auto-caching of tokens by using the following;
(or Disable-AzureRmContextAutosave with the older cmdlets)