Set up SSO and SCIM for MCP access with Entra ID or Okta
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.
What you'll 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
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
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
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 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
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.
Enter the SAML values
Open Single sign-on under Manage, choose SAML, and select Edit on Basic SAML Configuration. Set Identifier (Entity ID) to Metorial's Entity ID and Reply URL (Assertion Consumer Service URL) to Metorial's Reply URL. Select Save.
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/).
Add a group claim so the SAML response includes a groups attribute with the user's group memberships.
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.
3b. Configure Okta
Create the app integration
In Okta, open Applications, select Create App Integration, choose SAML 2.0, and name the app.
Enter the SAML values
In SAML Settings, set Single sign on URL to Metorial's Reply URL, Audience URI (SP Entity ID) to the Entity ID, and Name ID format to EmailAddress. Finish as an internal app.
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 .*.
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.
Other identity providers have guides in the Metorial Enterprise docs: Auth0, Google Workspace, JumpCloud, Microsoft AD FS, OneLogin, PingOne, Rippling, and any generic SAML 2.0 provider.
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
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.
Connect your identity provider
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.
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.
6. Map groups to MCP tool access
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.
Link a Workforce group
In Workforce, open Access, Groups, and open or create a group. On its SSO tab ("Choose who joins this group through SSO"), set the connection to Selected SSO groups and pick the identity provider groups.
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 reject write and destructive tools.
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.
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.
Troubleshooting
"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
Check that Name ID format is EmailAddress and that the user is assigned to the app.
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
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
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?
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?
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?
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 in the MCP gateway comparison.