apps/opik-documentation/documentation/fern/docs/administration/authentication/oidc.mdx
OpenID Connect (OIDC) is a modern authentication protocol built on OAuth 2.0. This guide walks you through configuring OIDC SSO for your Opik organization.
<Note> OIDC 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)OIDC offers several advantages over SAML:
| Feature | OIDC | SAML |
|---|---|---|
| Protocol | REST/JSON-based | XML-based |
| Token format | JWT | XML assertions |
| Setup complexity | Simpler | More complex |
| Mobile/API friendly | Yes | Limited |
| Workspace sync | Via default workspace | Via attribute mapping |
Choose OIDC when:
Choose SAML when:
Setting up OIDC SSO involves:
Create a new OIDC/OAuth application in your identity provider:
| Setting | Value |
|---|---|
| Application type | Web application |
| Grant type | Authorization Code |
| Redirect/Callback URL | https://www.comet.com/opik/oauth/callback/<organization-id> |
Ensure your OIDC application requests these scopes:
openid - Required for OIDCprofile - User profile informationemail - User's email addressAfter registering the application, collect the following from your IdP:
| Information | Description | Where to find |
|---|---|---|
| Client ID | Unique identifier for your application | IdP application settings |
| Client Secret | Secret key for authentication | IdP application settings |
| Authorization URL | Endpoint for authorization requests | IdP documentation or well-known endpoint |
| Token URL | Endpoint to exchange codes for tokens | IdP documentation or well-known endpoint |
| User Info URL | Endpoint to fetch user profile | IdP documentation or well-known endpoint |
| Field | Description | Example |
|---|---|---|
| Domain | Email domain for SSO users | company.com |
| Client ID | Application identifier from your IdP | abc123xyz |
| Client Secret | Secret key from your IdP | secret_... |
| Authorization URL | IdP's authorization endpoint | https://idp.company.com/oauth/authorize |
| Token URL | IdP's token endpoint | https://idp.company.com/oauth/token |
| Callback URL | Opik's callback URL | https://www.comet.com/opik/oauth/callback/... |
| User Info URL | IdP's user info endpoint | https://idp.company.com/oauth/userinfo |
| Field | Description | Default |
|---|---|---|
| Default Workspace | Workspace for new SSO users | Organization default |
| Application Resource ID | Custom resource identifier | Not set |
The unique identifier assigned to Opik when you registered it with your IdP:
The secret key used to authenticate Opik with your IdP:
The endpoint where users are redirected to authenticate:
https://idp.company.com/oauth/authorize
This URL receives authorization requests with:
client_id - Your application's client IDredirect_uri - The callback URLscope - Requested permissionsresponse_type - Always code for authorization code flowstate - Security parameter to prevent CSRFThe endpoint where Opik exchanges authorization codes for access tokens:
https://idp.company.com/oauth/token
Opik sends a POST request with:
grant_type - Always authorization_codecode - The authorization code receivedredirect_uri - The callback URLclient_id and client_secret - For authenticationThe URL where your IdP redirects users after authentication:
https://www.comet.com/opik/oauth/callback/<organization-id>
The endpoint where Opik fetches user profile information:
https://idp.company.com/oauth/userinfo
Opik uses the access token to request:
sub - User's unique identifieremail - User's email addressname - User's display nameWhen users authenticate via OIDC for the first time:
https://www.comet.com/opikhttps://<your-domain>.okta.com/oauth2/v1/authorizehttps://<your-domain>.okta.com/oauth2/v1/tokenhttps://<your-domain>.okta.com/oauth2/v1/userinfo<tenant-id>):
https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/authorizehttps://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/tokenhttps://graph.microsoft.com/oidc/userinfohttps://accounts.google.com/o/oauth2/v2/authhttps://oauth2.googleapis.com/tokenhttps://openidconnect.googleapis.com/v1/userinfohttps://www.comet.com/opik<your-domain>):
https://<your-domain>.auth0.com/authorizehttps://<your-domain>.auth0.com/oauth/tokenhttps://<your-domain>.auth0.com/userinfoAfter configuring both Opik and your IdP:
| Issue | Possible cause | Solution |
|---|---|---|
| "Invalid redirect URI" | Callback URL mismatch | Verify callback URL matches exactly in both Opik and IdP |
| "Invalid client" | Wrong client ID | Verify client ID is copied correctly |
| "Invalid client credentials" | Wrong client secret | Verify client secret, regenerate if needed |
| "Scope not allowed" | IdP scope restrictions | Ensure openid, profile, email scopes are allowed |
| User not created | Missing email claim | Verify IdP returns email in user info response |
/.well-known/openid-configuration returns valid JSON.Use browser developer tools to inspect the authentication flow:
Opik handles tokens securely: