Skip to content
Back|Documentation
Docs navigation

SSO and domains

Connect Okta, Microsoft Entra, Google Workspace or any OIDC or SAML provider, prove you own your email domain, decide whether members must use SSO, and know what they will see.

Updated October 2026Organization2 of 3

Short answer

Single sign-on is set up in Settings → SSO in three steps: protocol (OpenID Connect or SAML 2.0), provider preset, then issuer and credentials with the email domain to claim. Verify the domain with a DNS TXT record so sign-in routes that domain to your IdP, then optionally turn on Require SSO and auto-join in Policies. SSO is a Business and Enterprise feature.

Before you start

  • You need the organization's SSO permission (owners and admins). Other members see "Only organization admins and owners can view SSO configuration."
  • Your plan must include Enterprise SSO (Business or Enterprise; the pricing page lists it).
  • You will claim an email domain you control. Public mail domains such as gmail.com cannot be claimed.
  • From your IdP you need either an OIDC issuer, client ID and client secret, or a SAML entity ID, SSO URL and signing certificate.

Connect an identity provider

  1. Step 1

    Choose the protocol

    Open Settings → SSO (?settings=sso) and pick OpenID Connect — recommended or SAML 2.0.
  2. Step 2

    Choose the provider

    Okta, Microsoft Entra, Google Workspace or Custom. A preset only prefills the issuer, for example https://login.microsoftonline.com/{tenant-id}/v2.0.
  3. Step 3

    Configure

    OIDC: Issuer URL, Client ID, Client secret. Akili fetches <issuer>/.well-known/openid-configuration itself. SAML: Issuer (IdP entity ID), Entry point (SSO URL), X.509 certificate. Both: the Domain claim, the email domain whose users are directed to this provider.
  4. Step 4

    Register the callback at your IdP

    Akili generates a provider ID. OIDC redirects and the SAML assertion consumer URL are built from it under your auth service base, for example {auth base}/api/auth/sso/saml2/callback/{providerId}.
  5. Step 5

    Verify the domain claim

    Press Request verification token, add the TXT record shown, then Verify domain. Until the status reads Domain verified, sign-in does not route the domain to this provider.

You can register more than one provider, each with its own domain claim.

Verify a domain

There are two DNS checks, each with its own TXT record, and they do different jobs.

The SSO provider check

Part of the SSO wizard. It proves the domain claim on one provider and is what turns on SSO routing for that domain.

dns
_better-auth-token-<providerId>.<your-domain>   TXT   <token from "Request verification token">

The Domains tab

Settings → Domains (?settings=domains) claims the domain for the organization as a whole. Add the domain, create the record, then verify; the status moves from Pending to Verified, or Not verified when DNS has not propagated yet (retry later).

dns
_akili-challenge.<your-domain>   TXT   akili-domain-verification=<token>

A verified domain does two things today:

  • Sign-in with an email at that domain (subdomains included) is routed to your SSO provider when one is verified for it.
  • Magic-link sign-in with an email at a claimed domain is refused unless the person is already a member or has a pending invitation; they see "Ask your domain administrator for access to Akili." and can press Request access to notify your admins.

Require SSO and auto-join

SSO policies in Settings → Organization → Policies
PolicyEffect
Require SSO for organization membersBefore a session is created, every non-SSO sign-in for anyone who belongs to the organization is refused: password, magic link, email code, Google, Microsoft, GitHub, Apple and passkeys. API keys are refused too. There is no exemption for owners.
Let anyone sign in via SSO join automaticallyA person who signs in through your verified provider without an invitation becomes a Member (never an owner). Off by default.

While Require SSO is on, a non-SSO session gets AUTH_SSO_REQUIRED and the sign-in page shows “Your organization requires SSO sign-in.” New sign-ups are never blocked, and the policies endpoint stays reachable so an SSO-signed-in owner can change the setting.

Provisioning (SCIM and just-in-time)

  • Just-in-time accounts. The first SSO sign-in creates the Akili account. Membership follows only with an invitation or the auto-join policy.
  • SCIM provisioning. Akili exposes /scim/v2/Users (SCIM 2.0 core: create, list with filter=userName eq "…", get, replace, patch, delete) plus the discovery endpoints /scim/v2/ServiceProviderConfig, /ResourceTypes and /Schemas, authenticated with a bearer token issued at /scim/tokens by a member with the SCIM permission. Creating a user adds the person to the organization as a member: an existing Akili account is linked by email; otherwise a passwordless account is created that signs in with SSO or a magic link. Setting active to false (or deleting) removes the member and its org roles, and refuses to remove the last owner. Names and externalId update in place; an email change needs the current address to be on a domain you have verified. /scim/v2/Groups is read-only (the organization as one group; group push answers 501). There is no SCIM screen in Settings yet; use the API.
  • Linking to an existing account. An SSO identity attaches to an existing Akili account with the same email only when that email is verified; otherwise sign-in ends with “account not linked” and a verification email is sent.

Enterprise sign-in client for connectors

In Settings → Connectors, the Enterprise sign-in client form registers an OAuth client at your IdP so Akili can exchange a member’s sign-in for tokens that MCP connectors accept (identity-assertion token exchange). You can reuse your SSO app’s client or register a dedicated one, and authenticate it with a secret in the body, a secret in the header, or a private-key JWT.

What members see at sign-in

  1. Step 1

    Email first

    The sign-in page asks for the email address and Continue. Akili checks the domain.
  2. Step 2

    Single sign-on detected

    If the domain has a verified provider the page shows Single sign-on detected, the note that signing in confirms identity but does not grant workspace access, and Sign in with {provider}. Use a different account goes back.
  3. Step 3

    Your IdP, then back to Akili

    The browser goes to the IdP and returns to the callback. A domain without SSO falls through to the normal method step (password, magic link, email code, social or passkey).

Troubleshooting

Common SSO errors and fixes
SymptomCauseFix
Email goes to the normal method step, not SSOThe domain claim is not verified, or the email's domain does not match it.Verify the claim in the SSO wizard; subdomains of the claimed domain match, other domains do not.
"Sign-in could not be verified" (state or issuer mismatch)The callback came back with a state or issuer that does not match the request, often a stale tab or a changed issuer.Start sign-in again from the sign-in page; check the Issuer URL matches the IdP exactly.
"account not linked"An Akili account with that email exists but the email is not verified.Verify the email from the message Akili sent, then sign in with SSO again.
enterprise_sso_unavailableAkili could not start the IdP redirect.Check the provider configuration and the IdP app status; try again.
auth_service_unavailableThe domain check could not reach the auth service.Retry; if it persists, contact your Akili operator.
"Your organization requires SSO sign-in"Require SSO is on and you used another method.Sign in through your IdP.
HTTP 502 on the callbackA proxy in front of Akili rejected the callback's large response headers (seen with Microsoft Entra).Operators: raise the ingress proxy buffer size to 16k. Users: start sign-in again; authorization codes are single-use.

Good to know

  • Reading versus changing. Viewing SSO needs the SSO read permission; registering, updating or deleting a provider needs SSO write, and the server enforces both.
  • Two-factor with SSO. Security settings show “Managed by your identity provider” for two-factor and recovery codes on SSO accounts; enforce MFA at the IdP.
  • Provider ID is random. It is generated in the browser when you create the provider; copy it from the saved provider when building callback URLs.
  • Members and seats. Auto-join adds members without a seat check. See Organization.

Frequently asked questions

Which identity providers work?

Any OpenID Connect or SAML 2.0 provider. Okta, Microsoft Entra and Google Workspace are presets that fill in the issuer; Custom takes any other issuer or SAML entry point.

Does signing in with SSO make someone a member?

Not by itself. The sign-in page says so: SSO confirms identity but does not grant workspace access. The person must be invited, or the organization must turn on the policy that lets SSO sign-ins join automatically as members.

Does Require SSO lock out the owner too?

Yes. Every member of the organization, owners included, is refused password, magic link, email code, social and passkey sign-in while the policy is on, and API keys are blocked as well. Make sure your own SSO sign-in works before turning it on; the policies endpoint stays reachable so an owner signed in through SSO can turn it off again.

Can I upload IdP metadata XML or point Akili at a metadata URL?

No. OIDC takes the issuer URL, client ID and client secret, and Akili reads the issuer's .well-known configuration itself. SAML takes the IdP entity ID, the SSO entry point and the X.509 certificate.

Where is the SAML ACS URL I must give my IdP?

It is derived from your auth service base URL and the provider ID Akili generated: {auth base}/api/auth/sso/saml2/callback/{providerId}. It is not printed in the wizard today, so copy the provider ID from the saved provider's card.