SSO Integration with Keykloac (Enterprise)
🔐 Azure AD Integration with OL-Hub
This guide will walk you through integrating Azure Active Directory (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
- Azure AD 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-hub
realm. - 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 Azure AD Application
- Open the Azure AD Admin Center.
- Navigate to Manage > App registrations.
- Click + New registration.
- Under "Supported account types", select:
✅ Accounts in this organizational directory only - In the Redirect URI, paste the URI from Keycloak (Step 5 above).
- Click Register.
- In the Overview page:
- Copy the Application (client) ID.
🔑 Step 3: Connect Azure AD to Keycloak
- Go back to Keycloak and paste the Client ID into the Client ID field.
- In Azure AD, 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 to:
🧬 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 | name | ol-tenantId | 4a6bfc5d-3bae-45a3-99b9-d1e255875adb |
ol-company | Hardcoded Attribute | name | ol-company | {your company name} |
ol-role | Hardcoded Attribute | name | ol-role | member |
Note: Dynamic mapping of claims such as email, company, or role from Azure AD is under investigation.
✅ 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 Azure AD 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!
Azure AD SSO is now integrated with OL-Hub. Users can log in securely using their organizational credentials.
Updated about 14 hours ago