apps/opik-documentation/documentation/fern/docs/administration/authentication/saml.mdx
SAML (Security Assertion Markup Language) SSO allows your users to authenticate using your organization's identity provider (IdP). This guide walks you through configuring SAML SSO for your Opik organization.
<Note> SAML SSO is available on Enterprise plans. This feature is not available in open-source deployments. [Reach out](https://www.comet.com/site/about-us/contact-us/) if you want to enable this feature for your Opik deployment. </Note>Before you begin, ensure you have:
company.com)Setting up SAML SSO involves two main steps:
Choose matching Service Provider (SP) URLs and enter them in both Opik and your identity provider (IdP).
https://<your-app-base-url>/sso/saml/acs/<organization-id>. Your app base URL is the origin you use to access the admin dashboard (for example, https://www.comet.com). Your organization ID is visible in the admin dashboard URL. The last path segment is used internally as the routing key for SAML responses to your organization.Add Opik as a new SAML application in your IdP. The specific steps vary by provider, but you'll generally need to:
Your IdP must send the following attributes in the SAML assertion:
| Attribute name | Description | Required |
|---|---|---|
guid | Unique identifier for the user | Yes |
email | User's email address | Yes |
firstName | User's first name | Recommended |
lastName | User's last name | Recommended |
If you want to automatically assign users to workspaces based on IdP attributes:
| Attribute name | Description |
|---|---|
workspaces | Comma-separated list of workspace names |
groups | User's group memberships (can be mapped to workspaces) |
Once your IdP is configured, enter the settings in Opik:
| Field | Description | Example |
|---|---|---|
| Domain | Email domain for SSO users | company.com |
| SP Entity ID | Your Service Provider Entity ID | https://<your-app-base-url>/sso/saml/acs/<organization-id> |
| SP ACS URL | Assertion Consumer Service URL | https://<your-app-base-url>/sso/saml/acs/<organization-id> |
| IdP Entity ID | Your IdP's Entity ID | https://idp.company.com/... |
| IdP SSO URL | URL where users authenticate | https://idp.company.com/sso/saml |
| IdP X.509 Certificate | Public certificate for signature verification | -----BEGIN CERTIFICATE-----... |
| Field | Description | Default |
|---|---|---|
| SP Private Key | Private key for signed requests | Not required |
| Sync Workspaces | Enable automatic workspace assignment | Disabled |
| IdP Debug | Enable verbose logging for troubleshooting | Disabled |
| Default Workspace | Workspace for users without workspace attributes | Organization default |
The Service Provider Entity ID uniquely identifies Opik to your IdP. This value should be:
https://<your-app-base-url>/sso/saml/acs/<organization-id>, set to the same value as the SP ACS URL.The ACS URL is where your IdP sends the SAML assertion after successful authentication:
Your identity provider's unique identifier. Find this in your IdP's SAML metadata or configuration:
The URL where users are redirected to authenticate. This is the entry point for the SAML authentication flow:
/sso/saml or similar.The public certificate used to verify SAML assertion signatures:
-----BEGIN CERTIFICATE-----).Enable workspace sync to automatically assign users to workspaces based on IdP attributes.
When a user authenticates via SAML with workspace sync enabled:
The workspace attribute should contain a comma-separated list of workspace names:
engineering,data-science,ml-platform
Ensure workspace names match exactly (case-sensitive).
guid → user.idemail → user.emailfirstName → user.firstNamelastName → user.lastNameemail claim is configuredguid, firstName, lastNameguid → User IDemail → EmailfirstName → First NamelastName → Last NameAfter configuring both Opik and your IdP:
| Issue | Possible cause | Solution |
|---|---|---|
| "Invalid SAML response" | Certificate mismatch | Verify the IdP certificate is correctly copied |
| User not redirected to IdP | Domain not configured | Check the domain setting matches user email |
| "User not found" | Missing required attributes | Verify guid and email attributes are mapped |
| Wrong workspace assignment | Attribute mapping issue | Check workspace attribute format and sync settings |
| Certificate validation error | Expired certificate | Update the IdP certificate |
guid and email attributes are sent by your IdP.If you continue to experience issues: