Warning: This set up guide is deprecated. Please visit our documentation on Set up SSO with Microsoft Azure AD.
This step-by-step guide explains how to set up Single Sign-On in Contentstack with Microsoft Entra ID as your SAML 2.0 Identity Provider (IdP). You create an SSO name and Assertion Consumer Service (ACS) URL in Contentstack, configure the Contentstack app in Microsoft Entra ID, exchange the IdP details, add users and application roles, map those roles to Contentstack, and then test and enable SSO.
How to create an SSO name and ACS URL in Contentstack.
How to configure the Contentstack app in Microsoft Entra ID as a SAML 2.0 IdP.
How to add application roles and assign them to users for IdP role mapping.
How to test and enable SSO for your organization.
The integration with Microsoft Entra ID Native App can be done in the following easy steps:
Let us see each of the processes in detail.
Note: Only the Organization Owner will be able to perform the steps discussed below.
Start by creating an SSO Name and generate the ACS URL in Contentstack

Note: The SSO Name can contain only alphabets (in lowercase), numbers (0-9), and/or hyphens (-).

These details will be used in the upcoming Step 2 for configuring the Contentstack app in Microsoft Entra ID.

Keep this window open, as you may need these details for setting up the Contentstack app in Entra ID.
Note: You need to be a Microsoft Entra ID administrator to complete the steps below.
To configure the integration of Contentstack into Microsoft Entra ID, you need to add the Contentstack app in the Microsoft Entra ID portal.

Note: Please make sure you have an active subscription of Microsoft Entra ID before we proceed to the next step.








Now in the Attributes & Claims section, you can view default or pre-set claims and their corresponding values.

Amongst the listed attributes above, the attributes email, first_name, last_name, and roles are mandatory, while all other attributes are optional.
| Name | Value |
|---|---|
| first_name | user.givenname |
| last_name | user.surname |
| user.userprincipalname | |
| roles | user.assignedroles |
Note: If you want to enable Role Mapping in Contentstack, then it is highly important to add the already set roles attributes as we need these for IdP Role Mapping, which we will cover in the next set of steps.




Next, you need to define roles in Microsoft Entra ID that would be used to create role mapping in Contentstack.
After setting the necessary configurations in Contentstack, you need to add users to your newly added application.
To do so, you need to perform the following steps:



You can either select from the given list of users or you can invite and add new users by inviting them.
Note: This is an optional step, but it”s mandatory if IdP Role Mapping is part of your Contentstack plan and you want to implement it.
Application Roles are defined under the application's registration manifest in the Microsoft Azure portal. To add user roles, perform the following steps:


Add the following code snippet of a new role under appRoles:
{
"allowedMemberTypes": [
"User"
],
"description": "Developer Role",
"displayName": "Developer",
"id": "18d14569-c3bd-439b-9a66-3a2aee02f15f",
"isEnabled": true,
"value": "developer"
}
The above code snippet is for adding a single role where the value provided to the value parameter is what you need to add in the IdP Role Mapping section of Contentstack. All the values provided in this snippet is user-defined.
For adding multiple roles, create similar snippets with the required role details. You can add multiple such IdP roles and add their mappings in Contentstack.
You will be able to see all the roles that you created when you assign them to your application users.
Note: This is an optional step, but it is mandatory if IdP Role Mapping is part of your Contentstack plan and you want to implement it.
This is an alternate way of managing users and permissions of your SSO-enabled organization. Performing this step lets you map your IdP roles to Contentstack roles while configuring SSO for your Contentstack organization.
To assign roles to application users, perform the following steps:
You can now proceed to create role mappings in Contentstack for the IdP roles you created. Go to the User Management section of your Contentstack SSO settings.
Note: You will only be able to view and perform this step if IdP Role Mapping is part of your Contentstack plan.
In the User Management section of Contentstack's SSO Setup page, you will see Strict Mode (authorize access to organization users only via SSO login) and Session Timeout (define session duration for a user signed in through SSO).
Below these options, you will see the Advanced Settings option.

Click it to expand the IdP Role Mapping section to map IdP roles to Contentstack.

Likewise, you can add more role mappings for your Contentstack organization. To add a new Role mapping, click + ADD ROLE MAPPING and enter the details.
While some details about these steps are given below, you can refer to our general SSO guide for more information.
Next, you can try out the “Test SSO” and “Enable SSO” steps in Contentstack.
Before enabling SSO, it is recommended that you test the SSO settings configured so far.
To do so, perform the following steps:
On successful connection, you will see a success message as follows:

If you have enabled IdP Role Mapping, you’ll find the following details in a new page:
Note: While testing SSO settings with IdP Role Mapping enabled, the test will be performed only for the IdP roles of the currently logged-in user (i.e., the Owner performing the test).

