Integrate with Zulip
Support level: Community
What is Zulip?
Zulip is an open-source team chat application that organizes conversations into topic-based streams, enabling more structured and efficient communication compared to traditional linear chat platforms.
Preparation
The following placeholders are used in this guide:
zulip.companyis the FQDN of the Zulip instance.authentik.companyis the FQDN of the authentik installation.
This documentation lists only the settings that you need to change from their default values. Be aware that any changes other than those explicitly mentioned in this guide could cause issues accessing your application.
authentik configuration
To support the integration of Zulip with authentik, you need to create SAML property mappings and an application/provider pair in authentik.
Create property mappings
Zulip expects SAML attributes for the user's email address and name. Create SAML provider property mappings that send those values with the attribute names used in the Zulip configuration.
-
Log in to authentik as an administrator and open the authentik Admin interface.
-
Navigate to Customization > Property Mappings, click Create, select SAML Provider Property Mapping, and then click Next.
-
Configure the first mapping for the user's email address:
-
Name:
Zulip email -
SAML Attribute Name:
email -
Expression:
return request.user.email
-
-
Click Finish to save the mapping.
-
Repeat the process to create the user's full name mapping:
-
Name:
Zulip full name -
SAML Attribute Name:
full_name -
Expression:
return request.user.name or request.user.username
-
-
Click Finish to save the mapping.
Create an application and provider
authentik 2026.5 introduces changes to how the SAML provider behaves. Specifically, the provider now automatically sets the Issuer value to: https://authentik.company/application/saml/<application_slug>/metadata/
Older versions of authentik set this value to authentik by default. If you're running an older version, please set Issuer to https://authentik.company/application/saml/<application_slug>/metadata/, where <application_slug> is the slug that you selected for the application.
-
Log in to authentik as an administrator and open the authentik Admin interface.
-
Navigate to Applications > Applications and click New Application to create an application and provider pair.
- Application: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings. Take note of the Slug because it will be required later.
- Choose a Provider type: select SAML Provider as the provider type.
- Configure the Provider: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations.
- Set the ACS URL to
https://zulip.company/complete/saml/. - Set the Audience to
https://zulip.company. - Set the SLS URL to
https://zulip.company/complete/saml/. - Under Advanced protocol settings:
- Select an available Signing Certificate.
- Set NameID Property Mapping to
Zulip email. - Add the
Zulip emailandZulip full nameproperty mappings to Selected User Property Mappings.
- Set the ACS URL to
- Configure Bindings (optional): you can create a binding (policy, group, or user) to manage the listing and access to applications on a user's Application Dashboard page.
-
Click Submit to save the new application and provider.
Zulip configuration
Zulip is a Django application and is configured with /etc/zulip/settings.py. Make sure that your settings.py file includes the current Zulip SAML authentication section before changing the settings below.
-
Uncomment
zproject.backends.SAMLAuthBackendinAUTHENTICATION_BACKENDS. -
In the
SAML Authenticationsection, configure authentik as a SAML IdP:/etc/zulip/settings.pySOCIAL_AUTH_SAML_ORG_INFO = {"en-US": {"displayname": "authentik Zulip","name": "zulip","url": "{}{}".format("https://", EXTERNAL_HOST),},}SOCIAL_AUTH_SAML_ENABLED_IDPS: dict[str, Any] = {"authentik": {"entity_id": "https://authentik.company/application/saml/<application_slug>/metadata/","url": "https://authentik.company/application/saml/<application_slug>/","attr_user_permanent_id": "email","attr_username": "email","attr_email": "email","attr_full_name": "full_name","display_name": "authentik SAML",},} -
Download the signing certificate from the authentik SAML provider and place it at
/etc/zulip/saml/idps/authentik.crt. -
Set the certificate permissions expected by Zulip:
chown -R zulip.zulip /etc/zulip/saml/find /etc/zulip/saml/ -type f -exec chmod 644 -- {} + -
Restart Zulip.
Configuration verification
To confirm that authentik is properly configured with Zulip, open Zulip and click Log in with authentik SAML. After you authenticate with authentik, you should be redirected back to Zulip.