# Single sign-on (SSO)

> Let staff sign in to DataxLand with their company account through Microsoft Entra ID, Google Workspace, Okta or any OIDC / SAML 2.0 IdP; verify your domain by DNS, provision accounts just in time and enforce SSO.

SSO is part of the **Enterprise** plan. The workspace Owner sets it up in **Settings → Security**.

## How it works

- The SSO connection belongs to your company's main workspace, while identity follows the **email domain**: anyone with an
  `@yourcompany.com` address (a verified domain) signs in through your company IdP, whichever workspace they belong to.
- Supports **OpenID Connect** (recommended: Entra ID, Google Workspace, Okta, Keycloak, Auth0…) and **SAML 2.0** (SP-initiated).
  DataxLand verifies the `id_token` signature with the IdP's public keys and SAML signatures with the certificate you paste in
  (it never trusts a certificate shipped inside the message), along with issuer, audience, expiry and a replay-protection nonce.
- **Just-in-time provisioning (JIT)**: someone from your domain signing in for the first time gets an account and joins the workspace
  with the **default role** (a custom role works too). With JIT off, only people who already have an account or an invitation can
  get in.

## 1. Create an app in your IdP

| IdP | Protocol | Redirect / ACS | Issuer to enter in DataxLand |
|---|---|---|---|
| Microsoft Entra ID | OIDC (App registrations → Web) | Redirect URI shown on the Security page | Directory (tenant) ID — DataxLand builds `https://login.microsoftonline.com/<id>/v2.0` |
| Google Workspace | OIDC (Google Cloud → Credentials → OAuth client ID, Web) | Redirect URI | filled in for you; enter your Google Workspace domain to accept company accounts only |
| Okta | OIDC (Applications → Web) or SAML | Redirect URI, or ACS URL + Entity ID | Okta domain (e.g. `yourcompany.okta.com`) |
| Other IdP | OIDC or SAML 2.0 | as above | Issuer URL (https) |

For SAML: turn off assertion encryption, use an email-format NameID (or send an `email` attribute), and download the signing
certificate (X.509) to paste into DataxLand. DataxLand's SP metadata is at the **DataxLand metadata**
address on the Security page.

## 2. Verify your domain

Add the domain, then create a **TXT** record in DNS named `_dataxland.<domain>` with the value shown on the page (of the form
`dataxland-verification=…`). Click **Check DNS**; DNS changes can take a few minutes to a few hours. Public email
domains (gmail.com, outlook.com…) can't be used. A domain belongs to one workspace only.

## 3. Enforce SSO

Once you have a verified domain and **one successful SSO sign-in**, turn on **Enforce SSO**: users of the domain can
no longer sign in with a password or Google, sign up on their own or reset a password. **Break-glass accounts** (up to 3, two-factor
authentication required) can still sign in with a password if the IdP has an outage.

**Trust the IdP's multi-factor authentication (MFA enabled at the IdP) for the workspace 2FA requirement**: turn it on when your IdP already enforces MFA; SSO sessions then satisfy the workspace's
"require 2FA" rule.

## When someone leaves the company

Disable their account in the IdP and they can't start a new session. An open session lasts until it expires (7 days of
inactivity); to cut access immediately, remove them from the workspace in **Members & roles**. Automatic
sync from the IdP (SCIM) is not part of SSO today.

Every change to the configuration and domains, every SSO sign-in, just-in-time account creation and break-glass sign-in is
recorded in the [audit log](/en/docs/workspace/audit-log).
