I have seen different Azure Portal login issues, in my own environments as well as in customer environments. Sometimes it’s somehow not possible again to login to the Azure Portal anymore and all you get back is a “Sign-In failed” message without any details. Searching the internet there are some potential solutions, but for one specific case I never found a solution. So I am happy to share the solution here.
Let’s start with the issue. You navigate to Azure Portal (portal.azure.com), login with your credentials and boom, an error message is displayed.
The first thing you normally do when such an error is shown is to delete the cache, restart the browser, restart your computer, login again and if you are lucky the issue is gone. In some cases it just stays there. What now? You need to find out if the account or the application (portal.azure.com) is responsible for the issue. In one case I quickly found out that I can login to the Office Portal (portal.office.com) with the same credentials. That means, that the account itself is fine and it must be some other issue with the portal.
After logging in to the Office portal, I also checked if I can reach the Azure Active Directory (aad.portal.azure.com) to get access to the sign-in logs. Guess what, that worked too. So I discovered a login issue with my account that showed me this.
I searched for the error code in the official docs and found it. It said:
The account needs to be added as an external user in the tenant first. Sign-out and sign-in again with a different Azure AD account.
This gave me the essential hint for one of my cases: I am using multiple tenants with B2B guest users. Depending on the settings, this can be a pain. Every user account that has access to multiple tenants can configure the default directory/tenant that is used after login.
If a tenant configuration changed, e.g. your permissions have been removed, but it is still used as your default tenant, the shown Sign-in issue can be experienced. So all you need to do is changing the default tenant and it will work again. But how can this be done if you cannot get to the Azure Portal? Easy, there is a way to select a specific tenant when connecting to the Azure Portal to override the default tenant configuration. Just use the URL “portal.azure.com/tenantdomain”.
With that, the login issues should be gone, you can get back into the Azure Portal and change the default tenant as needed. After logging out and back in the issue should now be gone.