SSO Integration with Keycloak (Enterprise)
This guide will walk you through integrating Microsoft Entra ID (formerly Azure AD) with your existing Keycloak instance to enable secure SSO (Single Sign-On) for OL Hub users.
🕒 Estimated time: 2–5 minutes
Prerequisites
- Access to Keycloak with admin rights
- Microsoft Entra ID tenant admin permissions
- Your OL Hub instance up and running
Step 1: Configure Keycloak Identity Provider
- Log in to your Keycloak admin console.
- Switch to the
ol-hubrealm. - Go to Configure > Identity Providers.
- Click Add provider and choose OpenID Connect v1.0.
- Copy the Redirect URI that appears – you'll need it later.
- Fill in the following fields:
- Alias / Display Name:
AzureAD(or your preferred name) - Enable Use discovery endpoint
- Paste this into the Discovery Endpoint field:
https://login.microsoftonline.com/{your_tenant_id}/v2.0/.well-known/openid-configuration - This will auto-fill the required OpenID Connect settings.
- Alias / Display Name:
Step 2: Set Up the Microsoft Entra ID Application
- Open the Microsoft Entra admin center.
- Navigate to App registrations.
- Click + New registration.
- Under "Supported account types", select:
✅ Accounts in this organizational directory only - In the Redirect URI, paste the Redirect URI you copied from Keycloak (Step 1, item 5).
- Click Register.
- In the Overview page:
- Copy the Application (client) ID.
Step 3: Connect Microsoft Entra ID to Keycloak
- Go back to Keycloak and paste the Client ID into the Client ID field.
- In Microsoft Entra ID, go to Certificates & Secrets.
- Click + New client secret, name it, and click Add.
- Copy the newly created secret and paste it into the Client Secret field in Keycloak.
- Open the Advanced section in Keycloak and set the Default Scopes.
Step 4: Configure Attribute Mappers
In the Mappers tab in Keycloak, configure the following attributes:
| Mapper Name | Type | Claim | User Attribute Name | User Attribute Value |
|---|---|---|---|---|
| ol-fullname | Attribute Importer | name | ol-fullname | |
| ol-tenantId | Hardcoded Attribute | n/a | ol-tenantId | <tenant-id> |
| ol-company | Hardcoded Attribute | n/a | ol-company | <your-company-name> |
| ol-role | Hardcoded Attribute | n/a | ol-role | member |
Replace <tenant-id> with your OL Hub tenant ID.
Final Steps
- Save your configuration in Keycloak.
- Navigate to your OL Hub instance.
- You should now see an AzureAD login button on the login page.
First Login Experience
- Clicking AzureAD will redirect you to the Microsoft Entra ID login screen.
- After logging in, Keycloak may prompt you to set up your initial profile.
- You’ll be redirected back to OL Hub.
🧠 On first login, OL Hub may ask you to provide a license key. If a license was already provided earlier, simply refresh the page.
You're All Set!
Microsoft Entra ID SSO is now integrated with OL Hub. Users can log in securely using their organizational credentials.