Patrick Lam, Firstly, apologies for the delayed response.
Typically the error message you’re seeing, AADSTS50020
, indicates that the user account you’re trying to use does not exist in the specified tenant.
Based on my understanding of your issue description, you are provisioning Azure Static WebApp ( or Azure App Service) via Visual Studio but receiving an error.
Just to clarify, a tenant is essentially a dedicated instance of Azure Active Directory (AAD)/Microsoft Entra that an organization receives when it signs up for a Microsoft cloud service (such as Azure, Microsoft 365, or Dynamics 365. )Each tenant is distinct and separate from other tenants.
Microsoft Learn Sandbox: This is a temporary environment provided by Microsoft Learn for hands-on training and experimentation. It is isolated from your organization's Azure environment. MS Learn FAQ.
So, it looks like you maybe using an account that was associated with Microsoft Learn Sandbox that was used for practicing training modules.
Kindly try the following steps to isolate the issue:
-If you haven't done, Sign out of Visual Studio and sign in again with your personal account which you had used to sign -up for Azure.
-On Azure Portal > On your profile (you can see the identity you’re using in the upper right-hand side of your Azure portal) >> select Switch directory
You may change the directory by selecting the 'Directories + Subscriptions' filter button on the toolbar along the top. As you mentioned you have 3 directories, you may simply switch to your personal account subscription/directory ( set it as default + mark as favorite )
For deleting the other directories, please checkout the conditions for deleting
Can't delete a directory through the Azure Management Portal
Discuss thread (How to remove directory) steps by my college.
Reference:
- Change Directory Tenants with your Azure Subscriptions
- Error AADSTS50020 - User account from identity provider does not exist in tenant ( 8 causes outlined)
- Manage Azure portal settings and preferences
Kindly let us know how it goes, I'll follow-up with you further.
If the answer helped (pointed, you in the right direction) > please click Accept Answer to benefit the community find answers quickly to similar question.