As usual, I was trying to use PowerShell Command line tool to manage my azure services. I used to prefer PowerShell as we have more control on it. This time, I got an error message, I was not able to run any Azure commandlets but I was able to add my azure account.
The error message is bit tricky and to solve the issue, I just follow closed and re-opened but still I got the same error message. I found that I got something issue with my saved credentials (token).
Error message,
Get-AzureSubscription : Failed to refresh token. AADSTS90002 : No Service namespace named ‘ ‘ was not found in the data store.
Trace ID:XXXXXXXXXX
Correlation ID: XXXXXXXXXXXXXXXXXX
TimeStamp: 2015-09-12 13:24:477 : The remote server returned an error : (400) Bad Request.
I followed the below steps to solve the issue,
Step 1: Explored the following folder in your system, C:\Users\{User Name}\AppData\Roaming\Windows Azure Powershell.
Note: AppData folder will be in hidden by default and replace {User Name} into your system name.
Step 2: I saw the below files inside the folder and Just deleted all the files.
Step 3: Closed the PowerShell tool and reopen again.
Step 4: Added my azure account, this time, I was able to run all commands successfully.
About the Author