Vendor configuration recipe; review against your vendor version. This page is not evidence of fresh external interoperability. Release verification scope.

Integrations · OIDC

Mattermost SSO

Configure Mattermost Team or Enterprise Edition to authenticate via Clavex using OpenID Connect. Supports automatic account creation, display name sync, and team/channel assignment from Clavex group claims.

OpenID Connect vs GitLab OAuth: Mattermost supports "GitLab" as an OAuth provider which is actually a generic OIDC flow. Use the OpenID Connect option available in Mattermost ≥ 5.33 (Enterprise) or the GitLab option for Team Edition with the correct endpoint URLs.

Prerequisites


Step 1 — Register OIDC Client in Clavex

Register in the organization console. Create the matching OIDC application or downstream SAML application using its actual supported configuration. Copy the exact callback and required client credentials into the vendor configuration below. The management API uses an organization ID and typed request fields; follow the current OIDC guide and release API schema, rather than the obsolete client_name/scopes recipe. Keep credentials server-side.

Step 2a — Configure via System Console (Enterprise)

  1. System Console → Authentication → OpenID Connect
  2. Set Select service provider to Other
  3. Fill in:
    FieldValue
    Button nameSign in with Clavex
    Button color#5DCAA5
    Discovery endpointhttps://id.acme.eu/acme/.well-known/openid-configuration
    Client IDmattermost
    Client secretcs_xxxxxxxxxxxxxxxx
  4. Click Save

Step 2b — config.json (Team Edition)

Use the GitLab SSO method with Clavex endpoints as a workaround for Team Edition:

config.json
"GitLabSettings": { "Enable": true, "Secret": "cs_xxxxxxxxxxxxxxxx", "Id": "mattermost", "Scope": "openid profile email", "AuthEndpoint": "https://id.acme.eu/acme/authorize", "TokenEndpoint": "https://id.acme.eu/acme/token", "UserApiEndpoint": "https://id.acme.eu/acme/userinfo", "DiscoveryEndpoint": "https://id.acme.eu/acme/.well-known/openid-configuration" }
bash
$ sudo systemctl restart mattermost

Attribute Mapping

Mattermost reads the following claims from the ID token / UserInfo response:

Mattermost attributeClavex claimNotes
Auth data (user ID)subStable identifier
Usernamepreferred_usernameMust be unique
EmailemailRequired
First namegiven_name
Last namefamily_name
PicturepictureAvatar URL

Troubleshooting

SymptomCauseFix
SSO button not visible Feature not enabled or license required Verify Enterprise license; check System Console → Authentication → OpenID Connect
An account with that username already exists preferred_username conflicts with existing local user Convert existing user to SSO via mmctl user convert
Login fails after successful redirect Redirect URI not registered in Clavex Add both /signup/openid/complete and /login/openid/complete to allowed redirect URIs
claim email_verified is false Clavex returns unverified email Mark users' emails as verified in Clavex Admin; or disable email verification requirement