Is it possible to redirect a specific Azure AD tenant registration page before entering a username?

We are developing a multi-tenant MVC application using Azure AD and OpenIdConnect for authentication. Users who do not have their own Azure AD tenant will get a user in our tenant domain. Registration and authentication works great and we also customized the login page for our tenant (like the company logo). The problem is with the "landing page" for authentication. Today all users are redirected to a page named login.microsoftonline.com similar to this:

enter image description here

I want all users to land on my domain login page for my domain (also at login.microsoftonline.com) so that they see our logo:

enter image description here

If a user from another tenant (not my domain tenant) logs into their email address, they are redirected to their company registration page. It is excellent. The same happens on the general landing page for my domain tenants and any other tenants. Which is also great. So how can I get all users to land on our custom login page? Btw, all users are redirected from the apps we manage, so we have full control over the code that sends users to Azure AD.

+3


source to share


2 answers


You can do this by simply adding a query string parameter whr

. Its value should correspond to the verified domain, which has the status active

in the section domains

in your Azure Active Directory (Portal Azure Managment Portal):

enter image description here

For example, if your domain is tradesolution.no

(and this is a domain active

in your AAD), you should redirect users to:



https://login.microsoftonline.com/?whr=tradesolution.no

Add a parameter whr

before or after any other parameters required for the OpenID Connect flow. Check out this article .

+1


source


We've written about how to achieve this scenario using Open ID Connect, SAML-P and WS-Fed. See here Note that you need to be able to enter a query string parameter in the login url.



-3


source







All Articles