Mattermost SAML SSO with OneLogin

A planning and build guide for signing self-hosted Mattermost users in through OneLogin over SAML, from prerequisites and certificates to attribute mapping and testing before rollout.

On this page

How Mattermost SAML SSO with OneLogin works

IT and security teams that want staff to sign in to self-hosted Mattermost with their OneLogin credentials can use SAML 2.0 for single sign-on, and OneLogin is one of the three SAML providers the Mattermost documentation covers. In this setup, OneLogin is the identity provider that authenticates the user, and Mattermost is the service provider that trusts the signed assertion OneLogin sends back. When a user opens Mattermost, the server redirects the browser to OneLogin, the user authenticates there (including any MFA policy OneLogin enforces), and OneLogin posts a SAML response to the Mattermost assertion consumer endpoint. Mattermost checks the signature against the identity provider certificate you configure, reads the attributes in the assertion, and creates or matches the local account. The SAML connector therefore depends on three things agreed in advance: the certificate and endpoint exchange between the two systems, the attribute names OneLogin sends for email, username and a stable identifier, and the Mattermost server URL that both sides use.

SSO is included from the Professional plan according to the Mattermost pricing page, but plan levels change, so confirm your plan with Mattermost before you design the integration. Ask the vendor to confirm in writing that your subscription includes SAML and which high availability or air-gapped options apply to your deployment, since those decisions can affect where the Mattermost server sits and how certificates are managed. Also confirm which Mattermost server version your environment will run, because the release schedule affects when you will need to revisit SAML settings during upgrades.

SAML handles sign-in only. It does not, on its own, deactivate a user when they leave the organization, and it does not refresh profile attributes such as name, email or team membership after the first login. A departed employee whose OneLogin account is disabled can still hold an active Mattermost account until something else removes it, so plan that gap before rollout. The later sections of this page cover how to close it, including directory synchronization and the account lifecycle process. Decide early who owns the offboarding step and how quickly it must happen, because that decision shapes the design more than the SAML settings do.

What you need before configuring OneLogin and Mattermost

Five things need to be in place before anyone opens the OneLogin portal or the Mattermost System Console. Each one is a dependency that, if missing, stalls the SAML configuration or forces a rework during change control.

A running self-hosted Mattermost server

You need a Mattermost server you operate, with an account that has system administrator access to the System Console. Confirm the server version against the Mattermost server releases page before you begin, because support windows differ between monthly releases and Extended Support Releases. A version that is near end of support will force an upgrade during the SSO project, so settle that question first and record the version in your change ticket.

Server releases page

A plan level that includes SAML

SAML SSO is part of the Professional plan and above according to the Mattermost pricing page, but licensing is tied to the seat count and the subscription in place. Confirm with your Mattermost account contact that the license on your server includes SAML before you plan the rollout, and check that the license is applied in the System Console. Ask whether your plan also covers any feature you intend to pair with SAML, such as AD/LDAP sync.

Pricing page

A OneLogin administrator account

The person configuring the integration needs rights in OneLogin to create and assign SAML apps, manage the connector settings, and assign users or roles to the app. Confirm that this account can also view the user attributes OneLogin will send, because attribute mapping errors are the most common cause of failed logins. Separate the admin who owns the app from the admin who approves change, so that a single person cannot push a SAML change to production alone.

A public HTTPS URL for Mattermost

OneLogin must reach the Mattermost Assertion Consumer Service endpoint, and users must reach the same site URL from their browsers and desktop apps. Confirm that the Site URL in the System Console matches the public hostname exactly, including scheme and port, and that the certificate is trusted by OneLogin and by client devices. A test environment on a private hostname will not work with a hosted identity provider, so plan the test tenant with a routable name.

Certificate and key handling process

The SAML connector uses signing and encryption certificates, so your organization's key management rules apply before any file is generated. Agree who creates and stores the private key, which certificate authority or self-signed process is approved, how the expiry date is tracked, and how a rotation is scheduled. Confirm the exact certificate and encryption settings against the Mattermost SAML documentation before change control starts, since option names and required formats can change between releases.

SAML SSO docs

How a SAML sign-in moves between OneLogin and Mattermost

The sign-in starts in the user's browser when they open Mattermost and are redirected to the corporate identity provider. After the user authenticates, the identity provider returns a signed SAML assertion to Mattermost's assertion consumer endpoint, and Mattermost matches or creates the account from the attribute values in that assertion. The certificate exchange sits at the trust boundary: Mattermost must trust the identity provider's signing certificate, and the identity provider must hold the encryption certificate Mattermost publishes. Check both certificates and the attribute names before rollout.

Trust boundary between the identity provider and the self-hosted Mattermost server during a SAML sign-in.

Configuration sequence for the OneLogin SAML connector

This sequence takes a Mattermost server from a confirmed HTTPS site URL to a working SAML sign-in through OneLogin, with each stage checked before the next begins. The result is a pilot account that signs in through OneLogin and maps to the right Mattermost user.

  1. Confirm the site URL and HTTPS certificate

    Before touching OneLogin, the Mattermost administrator confirms the Site URL in the System Console and checks that the certificate served at that address is valid, trusted by the test clients and issued for the correct hostname. SAML assertions are bound to this address, so a mismatch here causes failures later that look like identity problems. Check is complete when opening the Site URL in a browser from a pilot user's machine shows a valid certificate with no warnings.

  2. Create the SAML app in OneLogin

    A OneLogin administrator creates a SAML application for Mattermost in the OneLogin admin portal, using the SAML connector option that matches the Mattermost documentation for the version in use. Record the application's issuer and the SAML 2.0 endpoint OneLogin provides, since both are needed in the Mattermost settings. Check is complete when the application appears in the OneLogin app catalog for the pilot group and its metadata can be downloaded.

  3. Set the audience and assertion consumer values

    In the OneLogin application, the administrator enters the audience (entity ID) and the assertion consumer service URL that the Mattermost SAML documentation specifies for the server's Site URL. Copy these values exactly, including the trailing path and casing, because a single character difference causes the assertion to be rejected. Check is complete when the saved configuration shows the same values the Mattermost documentation lists, verified side by side with the page.

  4. Map NameID and attribute statements

    The administrator configures the NameID and attribute statements that Mattermost needs to create or match accounts, typically email, username and a stable identifier, using the exact attribute names listed in the Mattermost SAML documentation. Keep the stable identifier mapped to a value that does not change when a person's email or display name changes. Check is complete when a SAML tracer shows an assertion from OneLogin containing each required attribute with a populated value for the pilot user.

  5. Enter OneLogin metadata and certificate in Mattermost

    In the Mattermost System Console SAML settings, the administrator enters the identity provider metadata values and the signing certificate from OneLogin, and sets the attribute names to match the mapping from the previous step. If the team uses encrypted assertions, the encryption certificate and private key are configured here as well. Check is complete when the settings save without validation errors and the certificate expiry date shown in the console is recorded for renewal planning.

  6. Enable SAML sign-in for a pilot group

    With the settings saved, the administrator enables SAML sign-in in the System Console. Keep existing email sign-in available during the pilot so that administrators have a working path back if a setting needs correction. Check is complete when the Mattermost login page shows the SAML sign-in option and the change is recorded in the audit or administrator notes for the rollout.

  7. Test login with a pilot account

    A pilot user signs in through OneLogin in a clean browser session, and the administrator confirms in the System Console user list that the login matched or created the expected account with the correct username, email and auth method. Repeat the test with a second pilot account and, where the team uses admin roles, with an account that should not receive admin rights. Check is complete when both pilot accounts sign in, the account records match the OneLogin attributes, and the SAML tracer shows a valid signed response for each login.

Mapping OneLogin attributes to Mattermost account fields

This table compares each Mattermost account field that a OneLogin SAML assertion can populate, the OneLogin source to use, whether the field is required, and what breaks when it is wrong. Read the required rows first, because matching and sign-in depend on them, and confirm each attribute name against your Mattermost SAML settings before go-live.

Mattermost fieldOneLogin sourceRequired or optionalWhat breaks if it is wrong
Email addressUser email attribute mapped in the SAML app parametersRequiredUsers cannot be matched to existing accounts, and new accounts may be created as duplicates
UsernameUsername or login attribute mapped in the SAML app parametersRequiredSign-in fails for users whose username is missing, and collisions with existing usernames can block account creation
Unique ID valueStable user identifier, such as the OneLogin user ID, mapped to the SAML ID attributeRequiredIf the value changes for a person, Mattermost treats them as a new account and their message history stays on the old one
First nameFirst name attribute mapped in the SAML app parametersOptionalProfiles show blank or incorrect display names, which affects mentions and search results
Last nameLast name attribute mapped in the SAML app parametersOptionalProfiles show incomplete names, and the full display name may not match what users expect
Admin and guest rolesRole attributes defined in OneLogin, covered on the separate role assignment pageOptionalIncorrect role values can grant system admin rights or leave guests with more access than intended

Security controls for OneLogin SAML sign-in

Single sign-on moves the trust decision for Mattermost from the server to the identity provider, so the controls below sit in two places: the SAML connection and OneLogin itself. Each card is a decision your team should make and record before users are assigned to the app, and each one can be confirmed in your own OneLogin tenant and Mattermost System Console.

Require signed SAML assertions

Configure the SAML connector so Mattermost only accepts assertions that OneLogin has signed with the signing certificate you registered. Unsigned or altered assertions should be rejected, which is the baseline for trusting the login response at all. Check the SAML settings in the System Console after saving, and test with a user whose assertion has been tampered with in a lab to confirm the rejection. Then decide whether your policy also requires encrypted assertions, which adds a second certificate to manage and is worth it when assertions carry data you would not want readable in transit.

SAML SSO docs

Manage signing and encryption certificates

The SAML signing and encryption certificates expire, and an expired certificate stops every SAML sign-in at once. Record each certificate's expiry date in a shared calendar with reminders well ahead of time, and name an owner for each. Keep a written rotation runbook that covers generating the new certificate in OneLogin, uploading it to Mattermost, testing with a pilot account, and removing the old certificate. Confirm the exact certificate settings and expiry dates in your own tenant, since they are not fixed by this page.

Restrict who can use the app

Assign the Mattermost app in OneLogin only to users and groups who need Mattermost, rather than to the whole directory. Use roles or groups that map to your HR or directory structure so that removing someone from the group removes their access path. Review the assignment list on a set schedule and after reorganizations. Note that users who are not assigned cannot start a SAML sign-in, but accounts already created in Mattermost remain until they are deactivated there, so pair this control with a deprovisioning process.

Enforce MFA in OneLogin policy

Apply an authentication policy in OneLogin that requires multi-factor authentication for the Mattermost app, so the factor is checked by the identity provider before the SAML assertion is issued. This keeps the MFA decision in one place rather than configuring it separately in Mattermost. Test the policy with a standard user and with an administrator, and confirm in your tenant which factors your policy accepts. Remember that the MFA settings described for Mattermost's own email and LDAP logins do not apply to SAML users.

Limit System Console access to named administrators

Users who sign in through SAML get their Mattermost roles from attributes, so the people who can change SSO settings, certificates and roles should be a short, named list. Grant the system admin role only to accounts that need it, keep a second named administrator who can recover the system, and avoid using shared administrator accounts. Review the list of system admins in the System Console on a set schedule. Confirm how your version assigns admin roles from SAML attributes before relying on them.

Patch the server on a planned cadence

Mattermost releases a new server version in binary form on the 16th of each month, and it publishes Extended Support Releases with a longer support window. Choose which stream your organization runs, set a patch window for each release, and test SAML sign-in on a staging server before applying changes to production. Track the end-of-support date for your running version so the upgrade is scheduled before support ends. Confirm the current release dates and support windows on the server releases page before you commit to a schedule.

Server releases page

Testing Mattermost SAML SSO with OneLogin before rollout

Agree a written pilot plan before any user signs in through OneLogin. The plan should name three test accounts: a standard user who belongs to a small set of teams, a system administrator who needs console access, and a user who should be denied, such as a disabled or unassigned OneLogin account or a user outside the app's role mapping. For each account, record the expected result before the test starts. Check that the login completes, that Mattermost either creates the account on first login or matches the existing one using the agreed identifier, that the profile fields (email, username, first and last name) carry the values OneLogin sent, that team and channel membership matches what the pilot plan specifies, and that the administrator account has system admin rights while the standard user does not. The denied account must fail at the identity provider or be refused by Mattermost, with no session created.

Test sessions in every client the rollout will touch. In the web app, test a fresh private window and a session that starts from a OneLogin portal tile, then confirm logout ends the Mattermost session. Repeat the sign-in in the desktop app and the mobile apps, because SAML sign-in in native clients can follow a different path and may need a different browser or an embedded login flow. Confirm which login method each client uses and whether any client needs a separate password or a fallback path for users who cannot reach the browser. Confirm how session length and re-authentication behave in each client with your team, and check the sign-in behavior against the Mattermost SAML single sign-on documentation for the version you run.

Record every test as a row with the account, client, step, expected result, actual result, tester, date and the Mattermost server version. Attach the SAML settings export and the OneLogin app configuration version to the same record so a reviewer can trace what was tested. Keep the existing login method, whether email or another provider, enabled for all users until the change board signs off the pilot, and write down who can turn it back on and how quickly. Define failure criteria in advance, such as any denied account creating a session or any admin role mismatch, and decide whether a failed test stops the rollout or reopens it for retest. Only after sign-off should the existing method be disabled, and that change should be logged as its own approved step.

Common Mattermost SAML SSO with OneLogin failures and fixes

This table pairs the sign-in symptoms most often seen when Mattermost is connected to OneLogin with their likely causes and fixes. Read each row against a SAML trace of the failing login, and compare the assertion with the Mattermost SAML documentation before changing any setting, since several symptoms share the same root cause. The main takeaway is that most failures come from a mismatch between the OneLogin app and the Mattermost site URL, certificate or attribute configuration, not from Mattermost itself.

SymptomLikely causeFix
Login loops back to the sign-in pageThe Mattermost site URL in the System Console differs from the URL users open, or the SAML response is not accepted and Mattermost returns the user to loginSet the site URL to the exact address users browse to, including scheme, then compare the SAML response in a tracer with the Mattermost SAML documentation
Assertion rejected for signature or certificate mismatchThe IdP signing certificate in Mattermost is not the one OneLogin currently uses, or the response was signed with a different keyDownload the current OneLogin signing certificate, replace the value in the SAML settings, and confirm the signature algorithm matches on both sides
User created with wrong or duplicated usernameThe username attribute in the OneLogin mapping points to the wrong field, or an existing local account already uses that usernameCorrect the attribute mapping so the username claim comes from a unique value, then check existing accounts for conflicts before retrying
User denied because the OneLogin app is not assignedThe user or their group is not assigned to the Mattermost app in OneLogin, so OneLogin refuses to issue the assertionAssign the user or a role containing the user to the Mattermost app in OneLogin and ask the user to sign in again
Audience or ACS URL does not match the Mattermost site URLThe audience value or the assertion consumer service URL in OneLogin was copied from another environment or uses a different hostSet the audience and ACS URL to the values in the Mattermost documentation, built from the production site URL, and save the OneLogin app
Login fails after a certificate has expiredThe encryption or signing certificate reached its expiry date, and OneLogin and Mattermost no longer agree on the keyGenerate or download a renewed certificate, update both sides in a planned window, and record the expiry date in your certificate tracking
Desktop app shows an unexpected login screenThe desktop app does not use the same browser-based SAML flow as the web client, so it may show a forms or alternate login promptConfirm the desktop sign-in method the Mattermost documentation describes for your version, and test desktop login separately from the web client before rollout

Questions buyers ask about OneLogin SAML for Mattermost

How much effort does a standard OneLogin SAML setup for Mattermost take?

A standard setup is a bounded piece of identity work, and its effort depends on a few drivers rather than on Mattermost alone. The main drivers are how many OneLogin applications and Mattermost environments are involved, how many attribute rules you need to map (email, username and a stable ID are the core set), how long the signing and encryption certificate process takes inside your organization, whether your change control process requires a formal approval window, and how much test coverage you want before rollout. Ask any partner to break the quote into these drivers so you can see which ones your environment triggers. Effort rises quickly when several environments, custom attribute rules or strict certificate handling are added.

What does Mattermost SSO cost, and where do I find plan prices?

SSO is part of the plan structure, not a separate purchase. According to the Mattermost pricing page, SSO (SAML, OIDC, OAuth) and AD/LDAP user sync are included from the Professional plan upward, and Mattermost sells Professional, Enterprise and Enterprise Advanced plans as prepaid annual subscriptions based on seat licenses. The pricing page lists no public prices and directs buyers to contact sales, so you will need a quote from Mattermost for licensing. Your own costs also include the OneLogin subscription you already hold, the time your identity and Mattermost administrators spend on the work, and any partner fees, which follow from a written scope. Confirm which plan includes the features you need before you commit.

Can my own team set up OneLogin SAML for Mattermost without a partner?

Yes, if your team holds administrator rights in both OneLogin and Mattermost and can set aside time for a pilot. The work is mostly configuration: creating the SAML application in OneLogin, exchanging the metadata and certificates, mapping attributes, and setting the SAML connector in the Mattermost System Console. The harder parts are usually process rather than technology, such as getting a certificate owner named, agreeing a change window, and testing with real accounts before users depend on it. If any of those three are missing, or nobody on the team has done a SAML setup before, a partner can carry the build while your staff learn the configuration and keep ownership of it.

What access and inputs does the OneLogin SAML work need from my organization?

The work needs a short list of inputs that should be arranged before the build starts:

  • Administrator access to OneLogin, with rights to create and edit the SAML application, attribute mappings and certificates.
  • Administrator access to the Mattermost server and its System Console, plus access to the proxy or hosting layer if the certificate chain needs checking.
  • A named owner for signing and encryption certificates, who will track expiry and renewal.
  • Test accounts in OneLogin covering typical roles, including at least one admin and one guest-style user if you use those roles.
  • A change window agreed with the teams that run Mattermost and identity, with a rollback plan for the cutover.

Confirm with your identity team which of these they already hold, since missing items are the most common cause of delay.

Does SAML handle deprovisioning when an employee leaves?

No. SAML authenticates users at sign-in, but it does not by itself deactivate Mattermost accounts when someone leaves, and it does not refresh profile attributes on a schedule. A user who is disabled in OneLogin can keep an existing Mattermost session until it expires, and an account that is never signed in again stays active in Mattermost. Plan leaver handling as a separate control from day one. Options include enabling AD/LDAP synchronization alongside SAML so that leavers are deactivated, or deactivating accounts through the System Console or the API as part of your offboarding process. Test the chosen path with a disabled test account before you rely on it.

What should I test before rolling OneLogin SAML out to all Mattermost users?

Test sign-in, attribute mapping, role handling and leaver handling before any broad rollout. A reasonable pilot covers a standard user, an administrator, a user whose email or username has changed, a user who is disabled in OneLogin, and a user signing in from the desktop or mobile apps, since client behavior can differ. Confirm that the email, username and stable ID attributes arrive in the form Mattermost expects, that the encryption certificate works end to end, and that existing local accounts are handled as you intend. Record the results so your security and compliance reviewers can see what was tested, and keep the pilot accounts in a documented list for future regression checks after upgrades.

How DeployOpen scopes and delivers Mattermost SAML SSO with OneLogin

DeployOpen approaches Mattermost SAML SSO with OneLogin as a written, fixed-scope engagement inside your own infrastructure. The work covers the OneLogin application, the SAML connector in your self-hosted Mattermost, encryption certificates, attribute mapping and testing before users are moved over.

How we scope

  • Confirm your Mattermost version, plan level and whether SAML will be the only sign-in method for users.
  • Record the OneLogin apps, user groups and attributes that Mattermost needs for email, username and ID.
  • Agree in writing which test users, environments and rollout steps are included before work starts.

How we build

  • Configure the OneLogin SAML application and the Mattermost SAML connector in a staging environment first.
  • Set up encryption certificates and attribute mapping, then check that sign-in returns the expected profile fields.
  • Test sign-in from web and desktop clients, including failure cases such as a disabled OneLogin account.

How we hand over

  • Deliver a configuration record covering OneLogin settings, Mattermost System Console values and certificate locations.
  • Document the test cases, results and the rollback steps used during the rollout.
  • Walk your identity and Mattermost administrators through certificate renewal and where settings are changed.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after the initial engagement.
  • Review SSO settings again when Mattermost server upgrades change how SAML is handled.
  • Plan retests of sign-in and certificate rotation after any change to OneLogin or Mattermost configuration.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.