> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up SSO and SCIM for MCP access with Entra ID or Okta
URL: https://metorial.com/docs/platform/guides/sso-and-scim

Connect Microsoft Entra ID or Okta to Metorial with SAML and SCIM, map identity provider groups to MCP tool access, and remove access at offboarding.

---

To set up SSO and SCIM in Metorial, open **Enterprise Admin**, go to **Security**, **Authentication**, and add a SAML connection for Microsoft Entra ID or Okta using the Entity ID and Reply URL Metorial shows you. Then add a SCIM directory to that connection and paste its SCIM endpoint and bearer token into your identity provider's provisioning settings. Map identity provider groups to Workforce groups, and those groups decide which integrations, tools, and skills people get through MCP. When the identity provider deactivates someone, SCIM marks them deprovisioned in Metorial and removes their groups.

<PageIntro>
  <Learn>
    * How to connect Entra ID or Okta with SAML
    * How to provision users and groups with SCIM
    * How identity provider groups turn into MCP tool access
  </Learn>

  <Reading title="Before you start">
    * Admin access to Metorial's **Enterprise Admin** and to your identity provider
    * Access to your company domain's DNS settings
    * A list of the identity provider groups that should get AI tool access
  </Reading>
</PageIntro>

{/* VERIFY: Enterprise Admin is opened from the settings menu in the dashboard and is only shown to enterprise accounts (packages/chrome/src/global.tsx, showEnterpriseAdmin). Confirm which plans include SSO and SCIM; only link https://metorial.com/pricing. */}

## 1. Verify your domain [#1-verify-your-domain]

In **Enterprise Admin**, open **Security**, **Authentication**. Under **SSO Domains**, select **Add Domain** and enter your root domain. Add the DNS TXT record Metorial shows to your domain's DNS settings. Metorial checks for the record periodically, and the domain can be used for SSO once it is verified.

## 2. Start the SAML connection [#2-start-the-saml-connection]

Under **SSO Connections**, select **Add SAML Connection** and choose **Microsoft Entra ID** or **Okta** as the SSO provider. Metorial shows two values to copy: **Entity ID** and &#x2A;*Reply URL (ACS URL)**. Keep the panel open while you configure your identity provider. Use the exact values, with no trailing slash.

## 3a. Configure Microsoft Entra ID [#3a-configure-microsoft-entra-id]

<Steps>
  <Step title="Create the enterprise application">
    In the Azure admin center, open **Enterprise applications**, select **New application**, then **Create your own application**. Name it and select **Create**.
  </Step>

  <Step title="Enter the SAML values">
    Open **Single sign-on** under **Manage**, choose **SAML**, and select **Edit** on **Basic SAML Configuration**. Set &#x2A;*Identifier (Entity ID)** to Metorial's Entity ID and &#x2A;*Reply URL (Assertion Consumer Service URL)** to Metorial's Reply URL. Select **Save**.
  </Step>

  <Step title="Map attributes">
    Select **Edit** on **Attributes & Claims** and set `emailaddress` to `user.mail`, `givenname` to `user.givenname`, `name` to `user.userprincipalname`, and `surname` to `user.surname` (all under `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/`).

    {/* VERIFY: the Entra guide in enterprise-docs has no group claim step. The generic SAML guide requires a `groups` attribute. Confirm the Entra group claim setup and whether Metorial expects group object IDs or names. */}

    Add a group claim so the SAML response includes a `groups` attribute with the user's group memberships.
  </Step>

  <Step title="Export metadata and assign users">
    In **SAML Signing Certificate**, download **Federation Metadata XML**. Assign the users or groups who should use Metorial to the enterprise application.
  </Step>
</Steps>

## 3b. Configure Okta [#3b-configure-okta]

<Steps>
  <Step title="Create the app integration">
    In Okta, open **Applications**, select **Create App Integration**, choose **SAML 2.0**, and name the app.
  </Step>

  <Step title="Enter the SAML values">
    In **SAML Settings**, set **Single sign on URL** to Metorial's Reply URL, &#x2A;*Audience URI (SP Entity ID)** to the Entity ID, and **Name ID format** to **EmailAddress**. Finish as an internal app.
  </Step>

  <Step title="Map attributes and groups">
    On the app's **Sign On** tab, open **Attribute statements**, select **Show legacy configuration**, then **Edit**. Map `id` to `user.id`, `email` to `user.email`, `firstName` to `user.firstName`, and `lastName` to `user.lastName`. Under **Group attribute statements**, add `groups` with the filter **Matches regex** `.*`.
  </Step>

  <Step title="Export metadata and assign users">
    On the **Sign On** tab, open **SAML Signing Certificates**, choose **View IdP metadata** from the active certificate's **Actions** menu, and copy the XML. Assign users to the app.
  </Step>
</Steps>

Other identity providers have guides in the [Metorial Enterprise docs](https://docs.metorial-enterprise.com/sso/entra): Auth0, Google Workspace, JumpCloud, Microsoft AD FS, OneLogin, PingOne, Rippling, and any generic SAML 2.0 provider.

## 4. Finish and test the connection [#4-finish-and-test-the-connection]

Back in Metorial, enter a **Name**, choose a **Metadata source** of **Metadata URL** or **Metadata XML**, paste the metadata, and select **Add Connection**. Open the connection and select **Test SSO** to sign in once before you roll it out.

## 5. Add SCIM provisioning [#5-add-scim-provisioning]

<Steps>
  <Step title="Create the directory">
    On the connection, open **Directories** and select **Add Directory**. Choose the **Directory provider** (**Microsoft Entra ID** or **Okta**), enter a **Directory name**, and select **Create Directory**. Copy the **SCIM endpoint** and **Bearer token** right away.

    {/* VERIFY: whether the bearer token can be viewed again after the panel closes. */}
  </Step>

  <Step title="Connect your identity provider">
    {/* VERIFY: Entra and Okta provisioning menus are vendor UI and are not covered in enterprise-docs. */}

    In Entra ID, open the enterprise application's **Provisioning** page, set provisioning to automatic, enter the SCIM endpoint as the tenant URL and the bearer token as the secret token, test the connection, and start provisioning. In Okta, enable SCIM provisioning on the app, enter the SCIM endpoint as the connector base URL with HTTP header (bearer token) authentication, turn on creating, updating, and deactivating users, and push the groups you need.
  </Step>

  <Step title="Check the sync">
    Open the directory in Metorial. **Users** lists the users it provisioned and **Groups** lists the groups. The directory's logs show each SCIM request with its query, request body, and response body.
  </Step>
</Steps>

## 6. Map groups to MCP tool access [#6-map-groups-to-mcp-tool-access]

<Steps>
  <Step title="Confirm the SSO groups">
    On the connection, open **Groups**. Groups sent by your identity provider appear here. To add one by hand, select **Create Group** and enter an **Identifier** that matches the group in your identity provider exactly.
  </Step>

  <Step title="Link a Workforce group">
    In Workforce, open **Access**, **Groups**, and open or [create a group](/docs/platform/workforce/grant-access). On its **SSO** tab ("Choose who joins this group through SSO"), set the connection to **Selected SSO groups** and pick the identity provider groups.
  </Step>

  <Step title="Grant resources to the group">
    Open each integration or skill under **Access**, select **Add Group**, choose **Allow**, and save. To make a team read-only, give it an integration whose [tool filters](/docs/platform/guides/tool-permissions) reject write and destructive tools.
  </Step>

  <Step title="Limit who can open the portal">
    In the portal's **Settings**, open **SSO** ("Choose who can access this portal"). For each connection, choose **Everyone has access**, **Selected SSO groups**, or **No access**.
  </Step>
</Steps>

## What happens at offboarding [#what-happens-at-offboarding]

When your identity provider deactivates or deletes a user, the SCIM directory marks them deprovisioned and clears their groups and roles. Group-based grants stop applying, so their Magic MCP URL no longer reaches those integrations. Their past tool calls stay in the logs.

{/* VERIFY: whether deprovisioning also ends active portal sessions and open MCP connections immediately, or only blocks new sign-ins and token refreshes. */}

## Troubleshooting [#troubleshooting]

### "Not assigned" error when signing in through Entra ID [#not-assigned-error-when-signing-in-through-entra-id]

Assign the user, or a group they belong to, to the enterprise application.

### Okta sign-in fails [#okta-sign-in-fails]

Check that **Name ID format** is **EmailAddress** and that the user is assigned to the app.

### Validation fails right after setup [#validation-fails-right-after-setup]

The Reply URL and Entity ID must match Metorial's values exactly, with no trailing slash, and the response and assertion must be signed.

### People sign in but see no tools [#people-sign-in-but-see-no-tools]

Their SSO group is not linked to a Workforce group, or the identifier does not match. Compare the user's **Groups** in the connection's **Users** tab with the Workforce group's **SSO** settings.

## FAQ [#faq]

### Which identity providers does Metorial support? [#which-identity-providers-does-metorial-support]

SAML guides cover Microsoft Entra ID, Okta, Auth0, Google Workspace, JumpCloud, Microsoft AD FS, OneLogin, PingOne, Rippling, and generic SAML 2.0. SCIM directories can be created for Entra ID, Okta, OneLogin, JumpCloud, and generic SCIM v2.0.

### Do we need SCIM if we already have SSO? [#do-we-need-scim-if-we-already-have-sso]

SSO decides who can sign in. SCIM keeps accounts and group memberships in sync and deprovisions people automatically when they change teams or leave.

### Can we use existing Entra ID or Okta groups? [#can-we-use-existing-entra-id-or-okta-groups]

Yes. Link them to Workforce groups on each group's **SSO** tab, and grant integrations to those Workforce groups.

### Does removing someone in the identity provider remove their AI agent's access? [#does-removing-someone-in-the-identity-provider-remove-their-ai-agents-access]

Yes, for access that comes from groups. Agents connected through Magic MCP act as the person, so once their groups are cleared there is nothing left to grant. Remove any direct grants on the account as well.

To see which other MCP gateways document SSO and SCIM, see [MCP gateways with SAML SSO and SCIM](/docs/compare/sso-and-scim) in the [MCP gateway comparison](/docs/compare).

## Related pages [#related-pages]

<Cards columns="2">
  <Card title="Grant Workforce access" icon="group" href="/docs/platform/workforce/grant-access">
    Create groups and allow them on integrations and skills.
  </Card>

  <Card title="Tool permissions" icon="lock" href="/docs/platform/guides/tool-permissions">
    Give a group read-only access.
  </Card>

  <Card title="Per-user OAuth" icon="key-2" href="/docs/platform/guides/per-user-oauth">
    How each person's own accounts are used for tool calls.
  </Card>

  <Card title="Access control on metorial.com" icon="external-link" href="https://metorial.com/access-control">
    SSO, SAML, and group policies for agents.
  </Card>
</Cards>