This step-by-step guide explains how to set up single sign-on (SSO) in Contentstack with OneLogin as your SAML 2.0 identity provider (IdP). You create a connection in Contentstack, set up the Contentstack app in OneLogin, exchange the IdP details, add users and roles, optionally map roles, and then test and enable SSO.
You can attach up to five SAML 2.0 IdPs to a single Contentstack organization. Each IdP is a separate connection with its own certificate, session policy, role mapping, and login URL. This guide walks through one connection. To add and organize more connections, refer to Configure Multiple Identity Providers.
This integration requires the following steps:
Let us see each of the processes in detail.
Note: SSO can be configured by the organization owner, a security manager, or a user with a custom role that has SSO write permissions.
Log in to your Contentstack account, open the App Switcher, go to Administration, and then click Single Sign-On.


Add a connection to open the New Connection dialog, and enter the following details:
Note: The SSO ID can contain only lowercase letters, numbers (0-9), and hyphens (-). You cannot change the SSO ID after you create the connection. SSO IDs are unique across all Contentstack organizations, so a name already in use elsewhere is rejected.
Let's use "sso-test" as the SSO ID.


Click Create.

Contentstack opens the connection at 1. SSO Configuration and generates the Assertion Consumer Service (ACS) URL, along with read-only details such as Entity ID, SAML Version, Attributes, and NameID Format. You need these details in Step 2. Keep this window open.
Note: The ACS URL contains this connection's SSO ID, so every connection in your organization has its own ACS URL. Use the ACS URL of the connection you are configuring.

Tip: Instead of copying the ACS URL and Entity ID individually into OneLogin, share Contentstack's service provider (SP) metadata in one step. Use Download Metadata XML. If you enable SAML encryption on this connection, the downloaded metadata also carries the public certificate your IdP uses to encrypt assertions. You can download that certificate on its own from the Contentstack public certificate link. For details, refer to Download Contentstack (SP) Metadata.
Note: You need to be a OneLogin administrator to complete the steps below.
Log in to your OneLogin Admin account, click the APPS tab, and click ADD APP in the top right corner.
From the applications displayed on the page, use the SAML Test Connector (IdP) application.

Set the Display Name for your Contentstack application, for example, "Contentstack," and click Save.
Tip: In an organization with more than one connection, name each OneLogin app after the Contentstack connection it serves, for example "Contentstack (Acme Employees)."

In Contentstack, copy the Assertion Consumer Service URL generated for this connection in Step 1.

Click the Configuration tab, and paste the ACS URL into the ACS (Consumer) URL Validator field in OneLogin. Paste the same value into the ACS (Consumer) URL field as well.

Go to the Parameters tab and add parameters. By default, the first parameter is NameID. Set its value to Email by clicking the parameter and selecting it from the dropdown.

Click Add parameter, add a parameter named first_name, select the Include in SAML assertion checkbox, and click Save.

Assign a value for the created field. Click the Value dropdown, select First Name, and click Save. Similarly, add last_name with Last Name as the value, and email with Email as the value.


[Optional step] If you want to map IdP roles to Contentstack roles, add a new attribute called roles. Select Include in SAML assertion and click Save.
Select Users Roles as the Value and click Save.
Note: Perform steps 9 and 10 only if IdP Role Mapping is part of your Contentstack plan.
Go to 2. IdP Configuration for this connection in Contentstack. You can provide OneLogin's details in one of three ways:
Tip: Importing metadata auto-populates the Single Sign-On URL, certificate, and related fields, which reduces manual entry and errors. Signature algorithm and SAML encryption are not part of IdP metadata, so you always set those by hand. For the full procedure and error handling, refer to Import IdP Metadata.
To enter the details manually:
Click the SSO tab of your Contentstack application in OneLogin. You will see the SAML 2.0 Endpoint (HTTP) URL field.

Click the "Copy to Clipboard" icon beside the SAML 2.0 Endpoint (HTTP) field, or copy the URL manually.
In Contentstack, go to 2. IdP Configuration for this connection, and paste the copied URL into the Single Sign-On URL field.

In the SSO tab, click View Details under the X.509 Certificate parameter.

The Standard Strength Certificate (2048-bit) window displays the details of the certificate. Click DOWNLOAD to download the certificate.

Upload the X.509 certificate that you downloaded into the Certificate field in Contentstack.
Warning: A connection stores one signing certificate. Contentstack shows its expiry date next to the field. When your IdP switches to a new signing certificate, every SAML assertion arrives signed by a certificate Contentstack does not recognize, and sign-in through this connection fails until you upload the new certificate here. Coordinate the replacement with the switch on the IdP side rather than waiting for the current certificate to expire.
Under Signature Algorithm, select the algorithm OneLogin uses. Available options are SHA-1, SHA-256, and SHA-512.
Note: The Single Sign-On URL must use HTTPS.
(Optional) Turn on SAML encryption to encrypt your SAML attributes. SAML encryption is configured per connection.
Click Save.
Note: The organization owner can always sign in with Contentstack credentials, regardless of SSO status. If SSO login fails after a certificate update, the owner can sign back in and restore the previous configuration.
After setting the necessary configurations in Contentstack, you need to assign the newly added application to your users.
You can assign a single user under Users > All Users. OneLogin automatically retrieves the list of potential users based on the user's email address.

Click NEW USER in the top right corner to add new users. Add the user's Email address, First Name, and Last Name.

On the Applications tab, click the + icon beside the Applications bar, and select your app in the Select Application dropdown. Then click CONTINUE. You will be led to the Edit Contentstack Login window where you can verify the details. Click Save.

Note: Assign only the users who authenticate through this connection. In an organization with more than one connection, a user is identified by email address across every IdP, and the same email cannot map to different users in different IdPs.
With this, you are done with setting up the Contentstack app in OneLogin. Proceed to configuring the remaining steps in Contentstack SSO in Step 6.
But if you want to perform IdP Role Mapping and allow user groups to sign in to your SSO-enabled organization directly (without an invitation) with the assigned permissions, perform Step 4.B.
Perform this step only if IdP Role Mapping is part of your Contentstack plan.
IdP Role Mapping allows you to map your IdP roles to Contentstack roles while configuring a connection.
You can now proceed to create role mappings in Contentstack for the IdP roles you created. Go to the 3. User Management step of this connection and perform Step 5.


Go to 3. User Management to define how users access your SSO-enabled organization through this connection. This step covers Strict Mode, User Email Whitelists, Session Time-Out, and Advanced Settings.
Strict Mode: Enable Strict Mode if you do not want any user to access the organization without SSO login.
Note: Strict mode is set per connection, but it takes effect across the whole organization. If any enabled connection has strict mode on, the entire organization is SSO-only. Because of this, only one connection can hold the strict mode toggle at a time, and enabling strict mode on one connection disables the toggle on the others. Disabling a connection that has strict mode on removes strict mode for the organization, because a disabled connection does not contribute to the organization's strict state.
User Email Whitelists: Lets specified users access APIs even when strict mode is enabled. This setting is organization-scoped and applies only when strict mode is enabled, so the field appears only under the User Management step of the connection that has strict mode enabled. Enter up to 100 email addresses separated by commas, for example, user1@example.com, user2@example.com. Each address must belong to an accepted, non-owner member of the organization.
Note: This is a plan-based feature. For access, contact our support team.
Session Time-Out: The Session Time-Out option lets you define the session duration for a user signed in through this connection. The default is 12 hours, and you can set any value between 1 and 24 hours. This setting applies per connection.

Advanced Settings: Click Advanced Settings to expand the IdP Role Mapping section and map OneLogin roles to Contentstack roles.
In the Add Role Mapping section, click + ADD ROLE MAPPING to add a new IdP role mapping, and enter the following details:
Note: The available products and roles depend on your Contentstack plan and the applications enabled for your organization.
Likewise, you can add more role mappings, up to 200 per connection. To add a new role mapping, click + ADD ROLE MAPPING and enter the details.
Enter ; (semicolon) in the Role Delimiter textbox.
Select the Enable IdP Role Mapping checkbox to enable the feature.
Warning: Once IdP Role Mapping is on, a user whose assertion carries no role matching any mapping is denied sign-in through this connection. Organization owners are exempt, so a successful test as the owner does not prove that other users can sign in. Before you enable it, confirm that every group you expect to sign in has a matching mapping and that the Role Delimiter matches what your IdP sends.
Click Next to continue.
Note: Role mapping is configured per connection. The roles applied to a user come from the connection that user signed in through, not from the union of every connection in the organization. For how IdP Role Mapping interacts with SCIM provisioning, refer to IdP Role Mapping.
Next, you can try out the "Test SSO" and "Enable SSO" steps in Contentstack.
Before enabling this connection, it is recommended that you test the settings configured so far. To do so, perform the following steps:

If you have enabled IdP Role Mapping, you will find the following details on a new page:
Click Close. Now, you can safely enable this connection.
Note: While testing with IdP Role Mapping enabled, the test is performed only for the IdP roles of the currently signed-in user.
Once you have tested your settings, click Enable SSO to enable this connection. Confirm your action by clicking Yes.
Once enabled, users can access the organization through this connection. You can disable it from the same page at any time.
Note: The first connection you enable becomes the organization's primary connection. In an organization with more than one connection:
For the full set of connection actions, refer to Manage SSO Connections.


Additional Resource: To add more identity providers, refer to Configure Multiple Identity Providers. OneLogin also supports SCIM provisioning, which is configured once at the organization level and is shared by every connection.