> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackshift.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# SSO and directory sync (SCIM)

> Sign your team in through SAML or OpenID Connect, require it for your company domain, and add or remove people from your directory with SCIM.

> [!TIP]
>
> **Live.** This area is documented as current, user-reliable behavior.

## Goal

Connect your identity provider so people join, sign in and leave through it.

## Prerequisites

* Owner or Admin of the team.
* Admin access to Okta, Microsoft Entra ID, Google Workspace or another SAML or OpenID Connect provider.

## Workflow

**Step 1**

In team settings, open SSO and directory.

**Step 2**

Add your company domain and create the TXT record \_stackshift-sso.\<domain> with the value shown, then choose Verify.

**Step 3**

Under Single sign-on, set up SAML (Name, Issuer, Metadata XML) or OpenID Connect (Name, Issuer, Client ID, Client secret) and choose Save connection.

**Step 4**

Copy the ACS URL and SP metadata URL, or the Redirect URL, into your identity provider.

**Step 5**

Choose Test sign-in. The connection shows Connected after a successful test.

**Step 6**

Optionally turn on Require SSO for everyone with a verified domain address.

**Step 7**

For directory sync, choose SCIM link and token, then map directory groups to roles.

## Signing in

* People choose Sign in with SSO, enter their Work email and choose Continue with SSO.
* The first SSO sign-in for an address on a verified domain finds or creates the person’s account.
* With SSO required, people with a verified-domain address can only sign in through your provider. Tokens and agents they own work only after they have signed in through SSO at least once. The Owner can still sign in with a passkey if the provider is down.
* Requiring SSO needs a verified domain and a tested connection.

## Directory sync with SCIM

* SCIM link and token shows the SCIM base URL for the team and lets you make a token that expires after 30, 90 or 180 days. The token is shown once. Paste both into your provider’s SCIM settings.
* Map a group: choose the Directory group, what it Joins as (Admin, Developer, Billing or Viewer), and optionally Only on one project or database. Owner cannot be mapped.
* Someone in two groups gets both roles. People in no mapped group are not added. Existing accounts are linked only when their email is on a verified domain or they are already on the team.
* When someone is deactivated or removed from every mapped group, they leave the team, lose its roles, and are signed out of sessions that came through the team’s SSO. Tokens they made for this team are revoked at the same time; their personal tokens are kept. Owners are never removed by the directory.
* Sync now pulls changes immediately. Recent sync activity shows each change; the full record is in the audit log.

## Expected result

> [!TIP]
>
> People sign in at Sign in with SSO with their work email, and joiners and leavers in your directory are reflected on the team.

## Related guides

> [card] [IP allowlist and required two-step sign-in](https://docs.stackshift.cloud/team-and-access/ip-allowlist-and-two-step-sign-in.md)
>
> Limit where your team can reach StackShift from, and require a passkey or authenticator app for everyone on the team.

> [card] [Roles](https://docs.stackshift.cloud/team-and-access/roles-and-collaboration.md)
>
> Every person on a team has a role: Owner, Admin, Developer, Viewer or Billing. Developers build and deploy; once Access is switched on, they cannot delete production resources.

> [card] [Team audit log and export](https://docs.stackshift.cloud/team-and-access/audit-log.md)
>
> See everything people, tokens, agents and automations changed in a team, and everything they were refused. Export CSV or JSON, or stream it through Events.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.