Building Custom Sign-In Portals with Custom Branding Themes in Entra
So, if you have multiple applications within your tenant and want to spruce up how users authenticate, then I have a solution for you! I came across this in the latest Entra Community Newsletter that was just released, which allows for administrators to create custom sign-in portals for any app registration in their tenant. Why does this matter and how can you use it? Stick around and I'll tell you how in this latest article.
Why This Matters
Say for instance you have a cyber range like me, in which you have multiple users accessing various applications from within your tenant. You may desire to have a unique login page for said users that will look different from what your usual portal looks like, allowing you to separate the two. This where such a feature can come in very handy.
From a security perspective as well, you may also desire to display additional information or another Terms of Use link from within the sign-in portal. For my range, I have a different set of conditions that users must agree to in order to access the desktop pools and virtual infrastructure via Pomerium or Tailscale. Therefore, having the ability to separate my cyber range sign-in from my production is critical. Additionally, it allows me to tailor the experience and enhance it for those who will use the range. For example:
So in turn, this allows me to separate production authentication from the cyber range. Pretty cool right? I also built it so it redirected to the range's SharePoint site. Now, let me show you how it's done.
IMPORTANT: Before You Start
Before you get into this, I want to mention that this capability is only available to Entra P1 customers only. If you do not have a SKU that does not have P1 or higher, you will be unable to do this. Luckily, most licenses do have P1 so you should be fine. I did this with a Microsoft 365 Business Premium license and Enterprise Mobility + E5 and it works fine. However, if you have Business Standard or lower, you will need to upgrade.
Create your App Registration
This will be the first and primary step that will need to be completed prior to designing your custom theme. The reasoning for this is because the theme itself requires an app registration to be associated with the theme. Otherwise, it will assume that you are aiming for the default sign-in portal. I will assume at this point that you already know how to create an app registration, but if you are unsure, click the link here to learn more: How to register an app in Microsoft Entra ID - Microsoft identity platform | Microsoft Learn
Once you have the app registration complete, the app should populate in the next steps. Let's move onto the main event for this post, which is creating our custom sign-in.
Getting Started with Custom Branding Themes
Since we have the app registration configured, we can now begin the customization process. To do so, go to the Entra admin center -> then the Entra ID blade -> and finally scroll down to "Custom branding". Once you're there, you'll see the new option "Branding Themes (preview)". This is what you want to click:N
You'll notice that the process is quite similar to when you first built your custom branding for the first time. The only difference is you have to specify what applications will use the custom theme. This is where the app registration we created earlier will now be put into use:
Now we can begin the customization of the sign-in portal. Follow the prompts, and you will get a custom sign-in page that you can preview by hitting the button in the blue ribbon seen above. Once we're satisfied as to the look, then all we have to do is hit "Review + create" and we're good to go!
The only important thing to mention is that if you wish to use the new sign-in portal, you will need to explicitly use the following login endpoint:
https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/authorize?client_id={client-id}&response_type=code&redirect_uri={redirect-uri}&scope=openidAnd as a result we get our new sign-in page! If you experience any trouble, try in an inPrivate tab to view the new sign-in page.
Final Thoughts
I have been waiting for this feature for a long time. Having the ability to segment and enhance the user experience based on themes has been on my wishlist for awhile now. I look forward to using this in my cyber range and hope that you enjoy using it as well.
Until next time folks!
Comments