Credential complaint for Azure credentialsCredential complaint for Azure credentials
Solve credential expired errors with Azure.
John Savill
September 10, 2015
1 Min Read

Q. I am using Add-AzureAccount however it complains my credentials have expired even after running Remove-AzureAccount.
A. The solution seems to remove ALL accounts from your environment then try adding Add-AzureAccount again. The easiest solution is to run the PowerShell below which will remove all accounts from your machine and after this the Add-AzureAccount should work fine.
foreach ($AzureAccount in (Get-AzureAccount).ID) {Remove-AzureAccount $AzureAccount -Force}
Note that after running you will need to set the default subscription again, e.g.
Select-AzureSubscription -SubscriptionId
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like