Icon

How to Set Up Keycloak for Back Office: A Step-by-Step Guide

Learn how to set up Keycloak for back office operations with this comprehensive guide. Follow our step-by-step instructions to configure identity providers and create realms for seamless login experiences.

By Clyde Vassallo

In this guide, we'll learn how to set up Keycloak for backoffice use. We will start from the master realm, which is automatically provisioned when you initialize Keycloak. The first step involves setting up the identity provider to enable user login inside Keycloak

Next, we will create a new realm for the backoffice, named after the organization using it. Finally, we will create a Keycloak organization within this realm and assign a newly created identity provider to it.

Let's get started

This is a short guide on how to set up Keycloak for back office.

1
Click here
Step #1: Click here

We will start with the master realm. In the master realm, which is automatically provisioned when you set up Keycloak, the first thing you need to do is set up the identity provider.

2
Click on "Identity providers"
Step #2: Click on "Identity providers"

Go to the identity provider section. Select the identity provider you want to use to log into Keycloak.

3
Click on "Add provider"
Step #3: Click on "Add provider"

Once you choose your identity provider, follow the guide.

4
Click here
Step #4: Click here

Once set up, users can log into the Keycloak using the configured identity provider.

The second step is to create a realm for logging into the back office.

5
Click here
Step #5: Click here

Create a new realm and name it after the organization using the back office. The name (lowercase no symbols) should match the name of the organization owning the brand. For example, if the organization's name is Betsson and it owns 10 brands including Rizk, the name of the realm should be betsson. Once the realm is created, you can start configuring it.

6
Click on Create realm
Step #6: Click on Create realm

Go to the organization section and create a new organization.

7
Click on "Organizations"
Step #7: Click on "Organizations"
8
Click on "Create organization"
Step #8: Click on "Create organization"

The name of the organization should now be the name of the brand itself eg. Rizk. This is because a single organization can have multiple brands and people working for that organization can have access to 1 or more of those brands.

9
Click here
Step #9: Click here

For example, the name of the brand can be monkeytilt.

10
Type "monkeytilt"
11
Click here
Step #11: Click here

You can choose a display name for this brand, then go ahead and create it.

12
Type "Monkey Tilt"
13
Click on "Create"
Step #13: Click on "Create"

This will reflect the tenant inside the platform.

14
Drag here
Step #14: Drag here

Once we enter this organization, we can create and assign an identity provider to it.

15
Click on "monkeytilt"
Step #15: Click on "monkeytilt"

Before we can assign the identity provider, we need to configure another identity provider for this realm. This will be the identity provider used to log into the Backoffice not Keycloak.

16
Click here
Step #16: Click here
17
Click on "Add provider"
Step #17: Click on "Add provider"

Repeat the same process you did on the master realm. However note that this will be a separate identity provider with a separate Redirect URI inside the 3rd party idp system.

18
Click here
Step #18: Click here

Once it is configured, go back to the organization section and select the brand organization you created (eg. monkeytilt or rizk). It will be visible here when you assign it.

19
Click on "monkeytilt"
Step #19: Click on "monkeytilt"
20
Click on "Identity Providers"
Step #20: Click on "Identity Providers"
21
Click on "Assign"
Step #21: Click on "Assign"
22
Click on the Identity Provider you created.
Step #22: Click on the Identity Provider you created.

For Kaiser Bets, we assigned a Microsoft identity provider using the post broker login and the sync mode force.

23
See settings below
Step #23: See settings below

How to Set Up Keycloak for Back Office: A Step-by-Step Guide