Skip to content

SAML authentication

Zulip supports SAML single sign-on. SAML Single Logout is available when configured on both the server and identity provider.

This page describes how to configure SAML authentication with several common providers:

  • Okta
  • OneLogin
  • Entra ID (AzureAD)
  • Keycloak
  • Auth0

Other SAML providers are supported as well.

Your server operator must configure the authentication backend using the SAML server configuration documentation. Obtain the exact SP Entity ID, ACS URL, SP metadata, and signing requirements from the operator. These depend on your server configuration and may differ from the organization’s main website address. Provider field names below refer to their English UI; the locations can vary by provider version.

<sp-entity-id> and <acs-url> are placeholders for those operator-supplied values. Replace them before saving settings or JSON. Attribute names and mappings must match the server’s IdP configuration.

  1. Set up SAML authentication by following Okta’s documentation. Specify the following fields, skipping Default RelayState and Name ID format:
    • Single sign on URL: <acs-url>
    • Audience URI (SP Entity ID): <sp-entity-id>
    • Application username format: Email
    • Attribute statements:
      • email to user.email
      • first_name to user.firstName
      • last_name to user.lastName
  2. Assign the appropriate accounts in the Assignments tab. These are the users that will be able to log in to your Zulip organization.
  3. Provide your operator with the following information so they can finish the server configuration:

    • Your organization’s URL
    • The Identity Provider metadata provided by Okta for the application. To get the data, click the View SAML setup instructions button in the right sidebar in the Sign on tab. Copy the IdP metadata shown at the bottom of the page.
    • Your preferred label for the login button, for example “Log in with…”
    • (optional) An icon for the login button

You can configure each Zulip user’s groups to be updated based on their groups in your Identity Provider’s (IdP’s) directory every time they log in.

Your IdP directory’s group names don’t have to match the associated Zulip group names (e.g., membership in your IdP’s group finance can be synced to membership in the Zulip group finance-department). See the technical documentation on how your IdP’s groups are mapped to Zulip groups for details.

  1. Follow the instructions above to configure SAML, and go to the application you created for using SAML with Zulip in your Applications menu.
  2. Select the General tab, and Edit the SAML Settings section.
  3. Proceed through the prompts until the main Configure SAML prompt.
  4. Scroll down below the Attribute Statements section (which you configured when creating the app) to Group Attribute Statements.
  5. Add the following attribute:
    • Name: zulip_groups
    • Name format: Unspecified
    • Filter: Matches regex: .* When a user signs in to Zulip via SAML, Okta will now include a list of the user’s groups in its response to the Zulip server.
  6. To enable this feature, send your operator the following information:
    • Your Zulip organization URL.
    • Which groups should be synced from your IdP’s directory.
    • Which groups should have a different name in Zulip (if any).
  1. Ask the operator to finish the server configuration using the supplied IdP metadata, certificate, and attribute mappings.
  2. Test sign-in from the organization’s login page with an assigned test user. Confirm the correct organization, email, and name.
  3. If IdP-initiated login is enabled, test it separately from the provider’s application portal. Confirm RelayState selects the intended organization.
  4. If group sync is enabled, check the mapped group membership after a new login. SAML changes group membership at login; use SCIM for ongoing provisioning and deactivation.
  5. If Single Logout is configured, check it with the operator. Ordinary application logout alone does not confirm the provider session ended.