This post was most recently updated on September 25th, 2021.3 min read.
This article will describe a number of fixes to a situation, where your Visual Studio Cloud Explorer fails to show you the Azure Subscriptions you (should) have access to.
Your Cloud explorer might load for a long while, and finally, fail to display anything meaningful. Instead, you might see an error like the below:
This one was not fun. There are quite a few different reasons why your Visual Studio might suddenly struggle with your accounts.
Below, I’ll explain a couple of steps you can try to remove the offending guest organizations.
Time needed: 30 minutes.
How to fix Visual Studio Cloud Explorer being unable to access your subscriptions?
- Try re-entering your credentials
Ah well, this one is almost certainly not going to help, but it’s worth trying.
- The first step – try removing and re-adding the credentials
I’ve found extremely varying degrees of success for this step.
1. Cloud Explorer
2. Manage Accounts
3. In the “All accounts” section, “Remove” all your accounts
4. Restart your Visual Studio
5. Re-enter your credentials
If Cloud Explorer now works, great! If it doesn’t, proceed to the next step.
Additionally, if you get login prompts to any Azure AD organizations where you’re a guest (and logging in fails), make note of that – step 5 will handle any offending organizations like that!
- First option: Disable authenticating against quest directories
This is an easy first thing to try – disabling authenticating against guest directories might help you, at least get access to your primary directory’s resources, even if it doesn’t completely fix the issues with obsolete accounts.
You can find the right setting from the Options by following the path below:
Tools > Options > Accounts > Uncheck “Authenticate across all Azure Active Directories on sign-in”
Additionally, you could try changing the built-in, embedded web browser to a “System web browser”, which will eliminate any caches in the built-in Trident engine in Visual Studio.
- Continue by nuking the Visual Studio’s IdentityService cache
This is something that’s good to do regardless of whether the first step was successful or not, to get the Cloud Explorer to let go of any obsolete credentials.
First, close down all Visual Studio Instances.
Then, navigate to %LocalAppData% (usually something like “C:\Users\YourUser\AppData\Local“
Finally, remove a folder called “.IdentityService” (if you can’t see it, enable showing hidden files and folders)
This will reset your Cloud Explorer.
Don’t start Visual Studio at this point, though!
- Try leaving any guest organizations
In case you have been invited to any external organizations, where you are as a guest user in their Azure Active Directory tenant, being unable to log in to any of those tenants might cause displaying your Azure subscriptions to fail.
This seems to happen at least if you’ve been invited to be an active Azure user (like a Resource Group co-administrator), but then your log-in has been blocked.
You can leave any external organizations from “My Account” > Organizations. You can see a detailed outline of these steps from this blog article:
How to remove your account as a guest in another Azure AD tenant?
- Re-login to your accounts on Visual Studio Cloud Explorer
Cloud Explorer uses the identities that are configured to your Visual Studio deployment. Since you have just nuked the Identity Service, none should be configured at this point.
You can add your account from File > Account Settings > Sign In, or Cloud Explorer > Account Management (that’s the little person icon) > Sign In.
After a long-ish loading time, Cloud Explorer should display resources from your primary account without trying to authenticate against any foreign directories at this point!
… and that’s it! You should be good.
- Simple instructions that sometimes help:
- Similar issues:
- How to fix OnePlus 10 Pro Bluetooth issues - May 23, 2023
- How to actually uninstall conflicting PowerShell modules? - May 16, 2023
- How to enable Developer Mode on Android? - May 9, 2023