# Single sign-on

> Set up SAML 2.0 or OpenID Connect single sign-on with Okta, Microsoft Entra ID, Google Workspace or another identity provider, verify your domain, and provision users with SCIM 2.0.

Source: https://tryace.dev/docs/security/single-sign-on

Single sign-on (SSO) lets people on your company's email domain sign in to Ace through your identity provider (IdP), with SAML 2.0 or OpenID Connect (OIDC). With SCIM 2.0, your IdP also creates Ace accounts and removes access when it deactivates someone.

| | |
| --- | --- |
| **Plan** | Enterprise |
| **SSO protocols** | SAML 2.0 or OIDC |
| **Sign-in flow** | SP-initiated. IdP-initiated sign-in isn't supported. |
| **User provisioning** | Just-in-time (JIT) at first sign-in, and SCIM 2.0 |
| **Identity providers** | One per workspace, on one verified email domain and its subdomains |
| **Configured by** | An admin, in [**Settings** > **Team**](https://app.tryace.dev/settings/team) |
| **Default role** | Member |

## Key terms

| Term | Meaning in Ace |
| --- | --- |
| **Identity provider (IdP)** | Your directory, such as Okta, Microsoft Entra ID or Google Workspace. It authenticates people. |
| **Service provider (SP)** | Ace. It trusts your IdP to authenticate people on your domain. |
| **ACS URL** | The Assertion Consumer Service URL, where your IdP posts the SAML response |
| **Entity ID** | Ace's SAML identifier, also called the audience URI. It is also the URL of Ace's SP metadata. |
| **Redirect URI** | Where your IdP sends people back after an OIDC sign-in |
| **Verified domain** | The email domain you proved you own with a DNS TXT record |

## How sign-in works

1. On the [sign-in page](https://app.tryace.dev/sign-in), the person selects **Sign in with SSO** and enters their work email.
2. Ace finds the verified IdP for the email's domain and redirects the person to it.
3. The IdP authenticates them and returns them to Ace.
4. Ace checks the response, confirms the email is on the IdP's verified domain and the workspace is on Enterprise, then starts a session.

Sign-in always starts at Ace. Opening Ace from a tile on your IdP's dashboard sends an unsolicited response, which Ace rejects. To give people a tile, point it at `https://app.tryace.dev/sign-in`.

An email on a subdomain, such as `eu.acme.com`, signs in through the IdP for `acme.com`. If another workspace verified the subdomain itself, that workspace's IdP takes it.

Sessions last 7 days and renew while the person uses Ace, as they do for every sign-in method.

## Just-in-time provisioning

The first SSO sign-in creates the person's Ace account and adds them to the workspace as a **Member**, without an invite. An admin can change their role in [**Settings** > **Team**](https://app.tryace.dev/settings/team).

- People already in the workspace keep their role.
- People who belong to another Ace workspace stay there. Each person belongs to one workspace, and SSO never moves them.
- Your IdP can sign in only emails on your verified domain. It can't sign in any other address, even one with a pending invite.

Roles and approval permissions aren't mapped from your IdP. Manage them in Ace. See [Roles and permissions](https://tryace.dev/docs/security/roles-and-permissions).

## Before you start

- The workspace is on the Enterprise plan. Other plans see **Part of the Enterprise plan** in place of the setup form.
- You're an admin in Ace.
- You can create a SAML or OIDC app in your IdP and assign people to it.
- You can publish a TXT record in your domain's DNS.
- The domain is your company's own. Ace refuses public email domains, such as `gmail.com`, and domains another workspace has verified.

## Configure SAML

### 1. Copy Ace's SP details

Open [**Settings** > **Team**](https://app.tryace.dev/settings/team). Under **Single sign-on**, choose **SAML** and copy the **ACS URL** and **Entity ID**.

| Ace | Okta | Microsoft Entra ID | Google Workspace |
| --- | --- | --- | --- |
| **ACS URL** | **Single sign-on URL** | **Reply URL (Assertion Consumer Service URL)** | **ACS URL** |
| **Entity ID** | **Audience URI (SP Entity ID)** | **Identifier (Entity ID)** | **Entity ID** |

Both URLs end in your workspace's ID. Copy them from Ace rather than typing them.

### 2. Create the SAML app in your IdP

Create a SAML app with the two values from step 1, then set:

| Setting | Value |
| --- | --- |
| **Name ID format** | Email address |
| **Name ID** | The person's primary email address |
| **Signing** | Sign the response, the assertion or both. Ace checks the signature with the certificate in your IdP's metadata. |
| **Encryption** | Off. Ace doesn't accept encrypted assertions. |

Ace reads these attributes from the assertion. Attribute names must match exactly.

| Attribute | Used for | If it's missing |
| --- | --- | --- |
| `email` | The person's email | Ace uses the Name ID |
| `givenName` and `surname` | The person's name | Ace uses `displayName`, then the Name ID |

Microsoft Entra ID names its default claims with full URIs, such as `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress`, which Ace doesn't read. Set the **Unique User Identifier (Name ID)** to the user's email, or add claims with the names above.

Assign the app to the people and groups who use Ace.

### 3. Register the IdP in Ace

1. Download the IdP metadata XML from your SAML app.
2. In Ace, paste it into **Metadata XML**. Ace reads the IdP's SSO URL and signing certificate from it.
3. Enter the **Email domain**, such as `acme.com`.
4. Select **Register identity provider**.

### 4. Verify your domain

Follow [Verify your domain](#verify-your-domain).

## Configure OIDC

### 1. Create the OIDC app in your IdP

Create an OIDC web app that uses the authorization code flow. In Ace, open [**Settings** > **Team**](https://app.tryace.dev/settings/team), choose **OIDC** under **Single sign-on** and copy the **Redirect URI**. Add it to the app:

| IdP | Where the redirect URI goes |
| --- | --- |
| Okta | **Sign-in redirect URIs** |
| Microsoft Entra ID | **Redirect URI**, on the **Web** platform |

Ace requests the `openid`, `email` and `profile` scopes and uses PKCE. It picks the client authentication method your IdP advertises.

### 2. Register the IdP in Ace

Enter these, then select **Register identity provider**:

| Field | Value |
| --- | --- |
| **Issuer URL** | Your IdP's issuer, such as `https://acme.okta.com` for Okta or `https://login.microsoftonline.com/<tenant-id>/v2.0` for Microsoft Entra ID. It must use `https://`. |
| **Client ID** | The app's client ID |
| **Client secret** | The app's client secret |
| **Email domain** | The domain people sign in with, such as `acme.com` |

Ace reads the issuer's `/.well-known/openid-configuration` when you register. It refuses issuers and endpoints on private or internal addresses.

### 3. Verify your domain

Follow [Verify your domain](#verify-your-domain).

## Verify your domain

Nobody can sign in through the IdP until you prove you own its domain. Until then, it shows **Domain not verified**.

1. Under **Verify the domain**, copy the **TXT record name** and **TXT record value**. The name looks like `_ace-sso-<workspace-id>.acme.com`.
2. Publish a TXT record with that name and value at your DNS provider.
3. Wait for the record to propagate, which can take a few minutes.
4. Select **Verify domain**.

The status changes to **Active**. If the record expired before you verified, Ace shows a new one. Publish it and select **Verify domain** again.

If two workspaces register the same domain, the first to verify it keeps it.

## Configure SCIM

SCIM keeps Ace in step with your directory. Set up SSO first, because people join the workspace at their first SSO sign-in.

### 1. Create a SCIM token

1. Open [**Settings** > **Team**](https://app.tryace.dev/settings/team) and find **SCIM provisioning**.
2. Copy the **SCIM base URL**. It ends in `/api/auth/scim/v2`.
3. Select **Create SCIM token** and copy the token. Ace shows it once and stores only a hash.

### 2. Connect your IdP

| Ace | Okta | Microsoft Entra ID |
| --- | --- | --- |
| **SCIM base URL** | **SCIM connector base URL** | **Tenant URL** |
| SCIM token | **Authentication Mode**: **HTTP Header**, with the token as the Bearer token | **Secret Token** |

Turn on creating users, updating user attributes and deactivating users. In Okta, set **Unique identifier field for users** to `userName`.

Send a work email as `userName` or in `emails`. A user without an email address is rejected.

After the IdP connects, **Token** shows **Connected** and the token's expiry date.

### What Ace supports

| Feature | Support |
| --- | --- |
| Resources | Users and Groups |
| Operations | Create, read, replace, `PATCH` and delete |
| Filtering | Yes, up to 100 results a page |
| Bulk, sorting, ETags, password changes | No |
| Discovery | `/ServiceProviderConfig`, `/Schemas` and `/ResourceTypes` |

Groups are stored but don't grant roles or permissions in Ace.

### What SCIM does

| When your IdP | Ace |
| --- | --- |
| Pushes a new user | Creates their account, or links the existing account with that email. They join the workspace at their first SSO sign-in. |
| Changes a user's email | Accepts the new address only on your verified domain |
| Deactivates or deletes a user | Removes them from the workspace, ends their sessions and revokes the [MCP tokens](https://tryace.dev/docs/mcp) they created |
| Reactivates a user | Lets them back in. They rejoin at their next SSO sign-in. |

A deactivated person stays out until your IdP reactivates them. An old invite or another sign-in method can't bring them back. Deactivation removes admins too.

SCIM links an existing Ace account only when its email is on your verified domain and it doesn't belong to another workspace.

## Deprovisioning without SCIM

Disabling someone in your IdP stops new SSO sign-ins, but doesn't end a session they already have. Use SCIM, or remove them in [**Settings** > **Team**](https://app.tryace.dev/settings/team), to end their access at once.

## Enforcement and admin access

SSO isn't enforced. People on your domain can still sign in with Google or GitHub, so admins keep access if your IdP is unavailable.

## Security

- Ace checks the SAML signature against your IdP's certificate and accepts exactly one assertion per response.
- Ace rejects assertions outside their validity window, with 5 minutes of clock skew allowed.
- Ace accepts a SAML response only for a sign-in it started, and only once.
- OIDC client secrets are encrypted at rest with AES-256-GCM under their own key.
- SCIM tokens are stored as a hash. Ace never shows a token again after you create it.
- Only admins can view or change SSO and SCIM, from [**Settings** > **Team**](https://app.tryace.dev/settings/team).

For how Ace protects data more broadly, see [Security and data](https://tryace.dev/docs/security/security-and-data).

## Rotate certificates, secrets and tokens

Ace can't edit a registered IdP. To change the SAML metadata or signing certificate, or the OIDC client secret:

1. [Remove the IdP](#remove-the-identity-provider).
2. Register it again with the new details.
3. [Verify your domain](#verify-your-domain) again, with the new TXT record.

People can't sign in with SSO between steps 1 and 3. Plan rotations for a quiet time.

SCIM tokens last one year. To replace one, select **Create new token** and update your IdP. The previous token stays valid until it expires.

## If the workspace leaves Enterprise

- Nobody can sign in with SSO. People sign in with Google or GitHub.
- Your IdP can still deactivate and delete people through SCIM, so leavers lose access.
- It can't create, link, rename or reactivate anyone.
- An admin can still remove the IdP.

## Remove the identity provider

1. Open [**Settings** > **Team**](https://app.tryace.dev/settings/team).
2. Under **Single sign-on**, select **Remove identity provider** and confirm.

People on the domain can no longer sign in with SSO. Their accounts and workspace access stay, and they sign in with Google or GitHub. An admin can invite back people your directory had deactivated.

Then delete the SAML or OIDC app and its provisioning in your IdP, and the TXT record in your DNS.

## Troubleshooting

| Message or symptom | Cause | Fix |
| --- | --- | --- |
| "Single sign-on isn't set up for this email domain." | The domain isn't verified, or the email isn't on it | Verify the domain, and check the person signs in with their work email. |
| "Single sign-on is part of the Enterprise plan, and this workspace isn't on it." | The workspace isn't on Enterprise | Contact us about your plan. |
| "Your company's identity provider turned off your access to this workspace." | Your IdP deactivated the person through SCIM | Reactivate them in your IdP. |
| Sign-in from the IdP dashboard fails | IdP-initiated sign-in isn't supported | Start at `https://app.tryace.dev/sign-in`. |
| "The metadata XML has no single sign-on URL." | The pasted metadata is partial | Paste the IdP's full metadata XML. |
| "… is a public email domain." | The domain is a free email provider | Use your company's domain. |
| "… already signs in through another workspace's identity provider." | Another workspace verified the domain or a parent domain | Use that workspace, or contact us. |
| "The verification record expired." | The TXT record wasn't verified in time | Publish the new record shown, then verify again. |
| "Ace couldn't read the issuer's OpenID configuration" | The issuer URL is wrong or not public | Check the issuer, which must use `https://`. |

## Next steps

  - [Roles and permissions](https://tryace.dev/docs/security/roles-and-permissions): What admins and members can do, and how invites work.
  - [Security and data](https://tryace.dev/docs/security/security-and-data): What Ace reads, what it keeps and how it's protected.
