# Company sign-in (SSO)

> Let employees sign in to Eggent with the company account over OIDC. What to register in your identity provider, the console's fields, mapping groups to teams, examples for ADFS, Microsoft Entra ID and Keycloak, and SAML through a broker.

Source: https://eggent.ai/docs/enterprise-sso/

With company sign-in, people open Eggent and sign in through your identity provider as they do in your other systems. Eggent speaks **OIDC**. A person's workspace is created the first time they sign in, and their teams can come from their groups.

## In your identity provider {#idp}

Register a **confidential OIDC client** (an application with a client secret):

- **Redirect URI** — the address shown in the console's **Sign-in with company account** section, of the form `https://<console address>/sso/<company>/callback`.
- **Scopes** — `openid email profile`.
- **Groups** — if teams should follow groups, add a `groups` claim to the ID token.

Write down the issuer URL, the client ID and the client secret.

## In the console {#console}

Section **Sign-in with company account**:

| Field | What to put there |
|---|---|
| Issuer URL | Your identity provider's issuer address (examples below) |
| Client ID, client secret | From the client you registered |
| Claims | Which claims hold the email, the name and the groups. Usually `email`, `name`, `groups` |
| Administrator emails | People who sign in as the company's administrator |
| Create employees on first sign-in | A person who signs in for the first time gets a workspace. Off: only people already added in the console can sign in |
| Set teams from groups | Teams follow the groups mapped below |
| Turn off password sign-in | Employees can only sign in through the identity provider. The administrator keeps a password as a way in if the identity provider is down |

**Check connection** reads your provider's discovery document and keys and says what is wrong if something is.

A person is matched by the identity provider's subject; the first time, by email. An address the provider marks as not verified is never matched to an existing person.

## Groups and teams {#groups}

A table maps a group from your identity provider to an Eggent team:

| Group in the identity provider | Team in Eggent |
|---|---|
| `sales` | Sales |
| `dev-backend` | Backend |

On each sign-in the person's teams are set from their mapped groups. Only mapped groups change teams; groups that are not in the table are ignored, so teams you fill by hand are left alone.

## SAML and Active Directory {#saml}

Eggent does not speak SAML directly. If your provider offers only SAML, or you have a plain Active Directory without ADFS, put **Keycloak** in between as a broker: Keycloak signs people in through SAML or LDAP and gives Eggent an OIDC client.

## When someone leaves {#leaving}

A person removed from your identity provider can no longer sign in. Sessions already open end when an administrator [blocks](https://eggent.ai/docs/enterprise-console.md#block) the person, so block first.

## Examples {#examples}

| Provider | Issuer URL | Groups |
|---|---|---|
| ADFS | `https://adfs.company.tld/adfs` | An application group with a server application; add a claim rule that sends group names as `groups` |
| Microsoft Entra ID | `https://login.microsoftonline.com/<tenant-id>/v2.0` | App registration → Token configuration → Add groups claim |
| Keycloak | `https://kc.company.tld/realms/<realm>` | A client scope with a Group Membership mapper named `groups` |

In each case the client type is confidential (a web application with a secret), and the redirect URI is the one the console shows.
