The Azure is a continuously growing “monster” and sometimes you have no chance to follow it or a new environment is hide yet (but you know the name of this environment).
In this case you are facing an issue when you want to connect to your Azure subscription like this:
Login-AzureRmAccount : AADSTS90042: AADSTS50001: The application named https://management.core.windows.net/ was not found in the tenant named ***************. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant.
Luckily you have some choices to solve this “issue”:
- Ensure whether you use the latest Azure RM PowerShell module: https://www.microsoft.com/web/handlers/webpi.ashx/getinstaller/WindowsAzurePowershellGet.3f.3f.3fnew.appids
- Use the “AzureRmEnvironment” commands to specify the exact environment you want to connect to.
- Environments list: Get-AzureRmEnvironment
- Add an environment to your local computer environment list: Add-AzureRmAccount -EnvironmentName <new environment name>
- Login to an exact environment: Login-AzureRmAccount -EnvironmentName <new environment name>
- Connect to an specified environment: Connect-MsolService -AzureEnvironment <new environment name>
Finally you can connect to your subscription on the required environment.
Let’s try it! 🙂