OIDC-based authentication is available exclusively on Self Hosted Enterprise plan and SigNoz Cloud.
Overview
This guide walks you through setting up SSO using OpenID Connect (OIDC) with Keycloak, a powerful open-source identity and access management solution, with SigNoz.
What you'll accomplish:
- Configure Keycloak as an OIDC identity provider (IdP) for SigNoz
- Enable your team to access SigNoz using their existing Keycloak accounts
Prerequisites
Before you begin, ensure you have:
- Keycloak with administrative access
- SigNoz account (Cloud or Self-Hosted with License) with administrative access
- Your SigNoz instance URL (e.g.,
https://signoz.example.com)
Keycloak Configuration Steps
Step 1: Create a Realm in Keycloak Admin Console
- Log in to the Keycloak admin console at
http://<your-keycloak-domain>/admin/ - Click the realm dropdown in the top-left corner
- Click Create Realm
- Enter a Realm name (e.g.,
signoz) - Click Create

Step 2: Create an OIDC Client
- Navigate to Clients → Create client
- Under Client type, select OpenID Connect
- Set Client ID to a unique identifier (e.g.,
signoz) - Click Next
- On the Capability config page:
- Turn Client authentication to ON (this makes it a confidential client with a secret)
- Ensure Standard flow is checked
- Click Next
- On the Login settings page:
- Set Valid redirect URIs to
<your-instance-url>/api/v1/complete/oidc - Set Web origins to
<your-instance-url>
- Set Valid redirect URIs to
- Click Save
Step 3: Note the Client Secret
- Open your newly created client and go to the Credentials tab
- Copy the Client secret — you'll need this when configuring SigNoz

Step 4: Set Up Claim Mappers (Optional)
By default, Keycloak includes standard OIDC claims like email and name in the token. To include group memberships, you need to create a groups client scope.
Create the Groups Client Scope
- In the left sidebar, go to Client scopes
- Click Create client scope
- Fill in:
- Name:
groups - Type:
Default - Protocol:
OpenID Connect
- Name:
- Click Save

Add a Group Membership Mapper
- Inside the newly created
groupsscope, go to the Mappers tab - Click Add mapper → By configuration
- Select Group Membership
- Fill in:
- Name:
groups - Token Claim Name:
groups - Full group path: OFF
- Add to ID token: ON
- Add to access token: ON
- Add to userinfo: ON
- Name:
- Click Save

Assign the Scope to Your Client
- Navigate to Clients → select your SigNoz client → Client scopes tab
- Click Add client scope
- Select groups and click Add → Default

SigNoz Configuration Steps
Gather OIDC Information
You need three values from Keycloak:
- Issuer URL:
http(s)://<your-keycloak-domain>/realms/<your-realm-name>- You can verify this by visiting
http(s)://<your-keycloak-domain>/realms/<your-realm-name>/.well-known/openid-configurationand checking theissuerfield
- You can verify this by visiting
- Client ID: The Client ID you set in Step 2
- Client Secret: The secret from the Credentials tab
Configure SigNoz
- Go to Settings → Organization Settings → Members & SSO → Authenticated Domains
- Click Add Domain and select OIDC Authentication
- Enter your email domain (e.g.,
your-domain.com) - Fill in the OIDC settings:
- Issuer URL: the issuer URL from Keycloak (e.g.,
https://keycloak.example.com/realms/signoz) - Client ID: your OIDC client ID
- Client Secret: the client secret from Keycloak
- Issuer URL: the issuer URL from Keycloak (e.g.,
- Turn Get User Info to ON — this fetches additional claims (like groups) from the userinfo endpoint
- Enable the Enforce SSO toggle
- Click Save

Verify the Setup
- Create a user in your Keycloak realm (or use an existing one)
- Open a private/incognito window and navigate to your SigNoz URL
- Click Login → SSO Login
- Enter your Keycloak credentials when prompted
- Verify you are redirected back to SigNoz and authenticated
Configure Claim Mapping (Optional)
Claim mapping tells SigNoz which OIDC token claims contain the user's email, display name, groups, and role. The defaults work with standard Keycloak claims, but you can customize them if your mappers use different claim names.
Claim Mapping Fields
Configure these in SigNoz under Settings → Organization Settings → Members & SSO → Authenticated Domains → edit your domain → Claim Mapping section:
| Field | Default | Description |
|---|---|---|
email | Token claim name containing the user's email address | |
| Name | name | Token claim name containing the user's display name |
| Groups | groups | Token claim name containing the user's group memberships |
| Role | role | Token claim name containing the user's role |
Each value must match the Token Claim Name configured in the corresponding Keycloak mapper.
Add a Role Attribute Mapper in Keycloak (Optional)
If you want to assign SigNoz roles directly via a Keycloak user attribute, add a mapper for it:
Register the Custom Attribute
- In Keycloak, go to Realm settings → User profile tab
- Click Create attribute
- Fill in:
- Attribute name:
signoz_role - Display name:
SigNoz Role - Under Permissions, enable Can user view? and Can admin edit?
- Attribute name:
- Click Create

Create the Token Mapper
- Go to Client scopes → select the
groupsscope - Go to the Mappers tab and click Add mapper → By configuration
- Select User Attribute
- Fill in:
- Name:
signoz_role - User Attribute:
signoz_role - Token Claim Name:
signoz_role - Claim JSON Type:
String - Add to ID token: ON
- Add to access token: ON
- Add to userinfo: ON
- Name:
- Click Save


Set the Attribute on Users
- Go to Users → select a user → Attributes tab
- Set the key
signoz_rolewith a value ofADMIN,EDITOR, orVIEWER - Click Save

Configure Claim Mapping in SigNoz
- Go to Settings → Organization Settings → Members & SSO → Authenticated Domains
- Click on your OIDC domain to edit it
- In the Claim Mapping section, set the fields to match your Keycloak mappers:
- Groups:
groups(matches the group membership mapper created above) - Role:
signoz_role(matches the role attribute mapper created above)
- Groups:
- Click Save

You only need to configure claims that differ from the defaults. The standard OIDC email and name claims work out of the box with Keycloak — you typically only need to set Groups and Role.
Configure Role Mapping (Optional)
Role mapping automatically assigns SigNoz roles (VIEWER, EDITOR, ADMIN) to users when they log in via OIDC, based on their Keycloak groups or a custom role claim.
Role Resolution Priority
When a user logs in, SigNoz determines their role using this priority (highest to lowest):
- Use Role Attribute — if enabled and the token contains a role claim, that value is used directly
- Group Mappings — if the user belongs to multiple mapped groups, the highest-privilege role wins (ADMIN > EDITOR > VIEWER)
- Default Role — fallback role from configuration
- VIEWER — ultimate default if nothing else is configured
Option A: Group-Based Role Mapping
Map Keycloak groups to SigNoz roles. Users are assigned the highest-privilege role from their group memberships.
Create Groups in Keycloak
- In Keycloak, go to Groups in the left sidebar
- Click Create group
- Enter a group name (e.g.,
signoz-admins) and click Create - Repeat for other groups (e.g.,
signoz-editors,signoz-viewers)

Assign Users to Groups
- Go to Users → select a user → Groups tab
- Click Join Group
- Select the group (e.g.,
signoz-admins) and click Join

Configure in SigNoz
- Ensure you have set up the groups client scope and configured claim mapping for groups
- Go to Settings → Organization Settings → Members & SSO → Authenticated Domains
- Click on your OIDC domain to edit it
- In the Role Mapping section:
Set Default Role to
VIEWERUnder Group Mappings, add entries mapping each Keycloak group name to a SigNoz role:
Keycloak Group SigNoz Role signoz-adminsADMINsignoz-editorsEDITORsignoz-viewersVIEWERLeave Use Role Attribute Directly turned OFF
- Click Save

Option B: Direct Role Attribute Mapping
Assign SigNoz roles directly via a custom user attribute in Keycloak, without using groups.
Set Up Keycloak
- Register the
signoz_rolecustom attribute in the user profile - Create the token mapper for the attribute
- Set the
signoz_roleattribute on each user toADMIN,EDITOR, orVIEWER
Configure in SigNoz
- Ensure you have configured claim mapping with Role set to
signoz_role - Go to Settings → Organization Settings → Members & SSO → Authenticated Domains
- Click on your OIDC domain to edit it
- In the Role Mapping section:
- Set Default Role to
VIEWER(used as fallback) - Turn Use Role Attribute to ON
- Set Default Role to
- Click Save

The role value in the token is matched case-insensitively — admin, Admin, and ADMIN all resolve to the ADMIN role. If the value doesn't match any valid role, SigNoz falls back to group mappings (if configured) and then the default role.
Troubleshooting
Common issues and solutions:
- "Authentication failed" error: Verify that the Valid redirect URI in Keycloak exactly matches
<your-instance-url>/api/v1/complete/oidc. Ensure Client authentication is ON and the client secret in SigNoz matches the one in Keycloak's Credentials tab - "Invalid issuer" error: Check that the Issuer URL in SigNoz matches the
issuervalue from<keycloak-url>/realms/<realm>/.well-known/openid-configurationexactly. If SigNoz and Keycloak use different hostnames (e.g., Docker networking), configure Issuer Alias for the external URL - Stuck in a login loop: Ensure Enforce SSO is enabled in SigNoz and the user's email domain matches the configured authenticated domain
- Groups not appearing in token: Verify that the
groupsclient scope is assigned to your client as a Default scope (not Optional), and the group membership mapper has Add to ID token and Add to userinfo set to ON - User created with wrong role: Check the role resolution priority — if Use Role Attribute is ON, it takes precedence over group mappings. Verify the Token Claim Name in the Keycloak mapper matches the Role field in SigNoz claim mapping
- Custom attribute not included in token: Make sure the attribute is registered in the user profile and the mapper has Add to ID token, Add to access token, and Add to userinfo all set to ON
- "Get User Info" related errors: If your Keycloak is behind a reverse proxy or uses different internal/external URLs, ensure SigNoz can reach the userinfo endpoint at the issuer URL
- Locked out?: If you're unable to login because of faulty SSO setup, use password authentication by appending
?password=Yto your login URL:<your-instance-url>/login?password=Y