In Microsoft Azure PowerShell, when I run the Add-AzureAccount command I get this error:
Add-AzureAccount : The given key was not present in the dicti
I used AddAzureRmAccount
instead of AddAzureAccount
and it worked. I don't know the root cause and I am still digging into this. I will update this answer once I have something concrete on the lines of a probable root cause.
I found the answer to my problem here
http://blogs.msdn.com/b/devfish/archive/2015/02/12/get-azurevm-your-azure-credentials-have-not-been-set-up-or-have-expired-please-run-add-azureaccount-to-set-up-your-azure-credentials.aspx
The steps to fix the problem are as follows:
Remove-AzureAccount
Clear-AzureProfile
Add-AzureAccount