Skip to main content
Info

Looking for the Azure APIM gateway guide? It moved to Azure APIM gateway.

Context7 Enterprise supports single sign-on with Microsoft Entra ID (formerly Azure AD) over SAML. After setup, your users sign in to Context7 with their work accounts, and the same sign-in works in the dashboard, the ctx7 CLI and MCP clients that use OAuth.

Note

SSO needs only one Enterprise Application in Microsoft Entra ID. You do not need an Azure subscription, app registrations or Azure API Management. The setup takes about 20 minutes.

How it works#

We send you two SAML URLs. Your Entra admin creates a SAML Enterprise Application with them and sends back the application’s Federation Metadata URL. We add that URL to your connection, test it with you, and turn on SSO.

Before you start#

  • A Context7 Enterprise or Enterprise trial teamspace.
  • A Microsoft Entra admin who can create Enterprise Applications, for example with the Cloud Application Administrator role.
  • A list of every email domain your users sign in with, for example example.com and eu.example.com. If the domain people use to sign in to Microsoft is different from their mail domain, send both.

Contact context7@upstash.com with your admin’s contact details and your email domains to start.

Step 1: Receive the SAML URLs#

We create the SSO connection for your domains and send you two values:

ValueExample
Identifier (Entity ID)https://clerk.context7.com/saml/samlc_<ID>
Reply URL (Assertion Consumer Service URL)https://clerk.context7.com/v1/saml/acs/samlc_<ID>

Step 2: Create the Enterprise Application in Entra#

Create the application

In the Microsoft Entra admin center, go to Enterprise applications → New application → Create your own application. Name it Context7, choose Integrate any other application you don’t find in the gallery (Non-gallery), and click Create. Then open Single sign-on and select SAML.

Enter the SAML URLs

Under Basic SAML Configuration, set Identifier (Entity ID) and Reply URL (Assertion Consumer Service URL) to the values from step 1. Copy them exactly. A mismatch here is the most common cause of errors. Leave the other fields empty.

Keep the default claims

The default Entra claims work without changes. Context7 reads the emailaddress claim, which Entra fills from the user’s Mail attribute. If some users have no mail address, map emailaddress to user.userprincipalname instead.

Assign users or groups

Under Users and groups, assign the people who can use Context7. For the first test, assign one admin. Add more users or a group before rollout.

Send us the Federation Metadata URL

On the Single sign-on page, under SAML Certificates, copy the App Federation Metadata Url and send it to us. It has this format:

Step 3: Test and turn on SSO#

We add your metadata to the connection and send you a test link. Open it soon, because it expires. Ask us for a new one if it does.

When the test sign-in succeeds, we turn on SSO. Your users can then sign in in two ways:

  • At context7.com/sign-in, by entering an email address on one of your SSO domains. There is no separate SSO button. Context7 sends the user to Microsoft as soon as it recognizes the domain.
  • From the Microsoft My Apps portal, with the Context7 tile.

Step 4: Add your users to the teamspace#

SSO signs people in, but it does not add them to your teamspace. On their first sign-in, a user gets a personal Context7 account. Add them to the teamspace in one of these ways:

  • Invite them. On the Members tab, invite the user’s SSO email address. The user sees the invitation in the dashboard after they sign in, so the address does not need a mailbox.
  • Provision them from Entra. Set up SCIM provisioning, and Entra adds and removes members for you. It uses the same Enterprise Application.
  • Add them with the API. If your own onboarding flow decides who joins, call the management API to add each person by their SSO email. They get no invitation to accept. See Adding SSO members with the API.

Existing accounts#

SSO signs users in with the email address that Entra sends. If a user already has a Context7 account with that address, SSO signs them in to it. If the address is different from the one a user signed up with before, SSO creates a new account, and the old account and its teamspaces stay with the old address.

Before you turn on SSO, check which address Entra sends for the people who already use Context7, especially the teamspace owner. If the addresses differ, tell us and we will move your teamspace to the SSO account.

Troubleshooting#

"Application not found" on the test sign-in

The Identifier (Entity ID) in Entra does not match the one we sent, or the application is in a different Entra tenant from your users. Copy the Identifier again and confirm the tenant.

The user domain does not match the connection

The user signed in with an address on a domain that is not on the connection. Send us every domain your users sign in with, not only the primary one.

A user signs in but does not see the teamspace

SSO does not add members. See Add your users to the teamspace.

A user signs in to an empty account

Their Entra email address is different from their earlier Context7 address. See Existing accounts.

  • SCIM provisioning: let Entra add and remove teamspace members.
  • Azure APIM gateway and other MCP gateways: optional. Use these only if every MCP request must pass through your own gateway with the developer’s own Entra token. They need Azure resources that SSO does not.