Skip to content

Set up single sign-on

Single sign-on (SSO) lets your people sign in to Lainstack with the account they already use at work, through your company’s identity provider. Lainstack supports any provider that speaks OpenID Connect (OIDC) or SAML 2.0.

This guide is for the person who looks after sign-in for your company. You need permission to manage single sign-on for your super organization, access to your identity provider’s settings, and a way to publish a DNS record for your email domain.

SSO belongs to your super organization, so one connection covers every organization and workspace under it. You set it up on three pages under Settings, then Super organization:

  • Single sign-on connects your identity provider.
  • Domains proves your company owns its email domain, such as example.com.
  • Security chooses a recovery administrator and requires SSO.
Your identity provider says who the person is. Your verified domain says it may speak for that address.

SSO doesn’t let anyone join just because their address is in your domain. People still get in by invitation or by SCIM provisioning.

Open Settings, Super organization, Single sign-on. Choose OpenID Connect (OIDC) or SAML and click Start setup.

The protocol can’t be changed once setup has started. To switch, open the Single sign-on maintenance menu and choose Discard setup, then start again.

Follow the steps for the protocol you chose.

  1. In your identity provider, create a web application (a confidential client that uses the authorization code flow).
  2. Copy the Redirect URI from Lainstack into the application’s allowed redirect URIs. It ends in /endpoint. Use exactly this address.
  3. Make sure the application releases the openid, email and profile scopes.
  4. Back in Lainstack, enter the provider’s Issuer URL, the application’s Client ID and its Client secret, then click Save provider settings.

Use the issuer for your own tenant. A shared, multi-tenant issuer, such as Microsoft’s common endpoint, is refused.

The Single sign-on page for an OpenID Connect connection in setup, with the Redirect URI to copy and the Issuer URL, Client ID and Client secret fields.

The client secret is never shown again. When you edit the provider later, leave the secret empty to keep the one you saved.

  1. In your identity provider, create a SAML application. Give it the ACS URL and Entity ID from Lainstack, or upload the file from Download Lainstack metadata XML.
  2. Have the provider sign its assertions. Lainstack refuses unsigned ones.
  3. Back in Lainstack, give it your provider’s metadata, either as a Metadata URL or, with Use metadata XML instead, as the XML itself. Click Save provider settings.

Lainstack reads the signing certificate from the metadata. When your provider rotates its certificate, save new metadata that lists both the current certificate and the new one, before the current one expires.

When the settings are valid, the connection shows Available and an Organization sign-in link, which ends in /login/sso/ and your super organization’s short name. Share that link with your people.

The Single sign-on page for an available OpenID Connect connection, with the organization sign-in link and the Redirect URI.

Lainstack trusts the email address your provider sends only when its domain is one you have verified.

  1. Open Settings, Super organization, Domains and click Add domain. Enter the domain on its own, such as example.com. Subdomains count as separate domains.
  2. Lainstack shows a DNS record to publish: a TXT record named _lainstack.example.com with a one-time value. Copy it now. If you lose it, click Generate new DNS record; the previous value then stops working.
  3. Publish the record at your DNS provider, then click Verify domain. The domain shows Verified once Lainstack can read the record.
The Domains page with one verified domain and a subdomain waiting for verification, showing the TXT record to publish with its name, type and value.

Keep the record in place. Lainstack checks it again at most once a day. If it is missing three checks in a row, the domain stops vouching for new people. Anyone already signed in through SSO keeps working, and the domain recovers as soon as the record is back.

Lainstack needs the person’s email address from your provider, in a domain you verified.

  • OIDC reads the email claim. A person whose account has no email address is refused. In Microsoft Entra ID this is the user’s Email (mail) property, which is often empty for accounts that have no mailbox.
  • SAML reads an attribute named email, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress or urn:oid:0.9.2342.19200300.100.1.3. First and last names are read from firstName and lastName, the givenname and surname claims, or their urn:oid forms, so people don’t have to type their name on their first sign-in.
  • Verified email. If your OIDC provider sends email_verified, it must be true. Leaving it out is fine. A provider that sends false tells Lainstack nobody has confirmed the address, and that person is asked to confirm it by email every time they sign in. If you run your own Keycloak, mark your people’s emails as verified, for example by turning on Trust Email for your directory connection.

Signing in through SSO connects a person’s provider account to their Lainstack account the first time they use it. That happens only when:

  • their email address is in one of your verified domains, and
  • they already belong to your super organization, or to one of its organizations or workspaces, or they have a pending invitation into it.

An invited person who has no Lainstack account yet gets one on their first sign-in and accepts the invitation from Personal, Invitations. When their address is in a verified domain, their invitation email links straight to your organization sign-in.

After that first sign-in, Lainstack knows the person by their provider account, not by their address. If you change someone’s email address in your provider, Lainstack follows it on their next sign-in, as long as both the old and new addresses are in your verified domains and nobody else in Lainstack already has the new one.

A session that started through your provider lasts 30 minutes. As it nears the end, the next page a person opens checks with your provider again. If they are still signed in there, they carry on without typing a password. If you have disabled them in your provider, they are signed out.

Before you require SSO, choose someone who can still get in if your identity provider is down or misconfigured.

  1. Open Settings, Super organization, Security.
  2. In Recovery administrator, click Choose.
  3. Pick a person and give a reason. The list shows why the others can’t be chosen. The recovery administrator must:
    • be a Director or Finance in the super organization,
    • have an email address outside your verified domains, and
    • have finished setting up password sign-in.
The Choose a recovery administrator dialog, listing super organization members with the one whose password sign-in is ready and why the others can't be chosen.

The page shows a Recovery sign-in link. The recovery administrator should bookmark it. Signing in there uses their password, outside SSO, and lets them stop requiring SSO.

Require SSO stays unavailable until a recovery administrator is chosen.

To require SSO you must be signed in through it yourself. Use your organization sign-in link, then open Security and click Require SSO.

From then on, anyone whose address is in a verified domain is sent straight to your identity provider. Password sign-in and Google or Microsoft sign-in are refused for those addresses. People with addresses outside your domains, such as contractors, sign in as before.

Lainstack checks the connection again before it switches. If the check fails, the connection shows Needs attention and SSO is not required.

To go back, click Stop requiring SSO. People can use their usual sign-in methods again, and the connection stays available.

State What it means
Setup in progress Provider settings are still being entered. Nobody can sign in through it yet.
Available The connection works, and so does the organization sign-in link.
Needs attention Something no longer matches, such as a changed provider or a domain that failed its checks. New sign-ins through SSO are refused until you fix it. Open the Single sign-on maintenance menu, choose Edit provider and save again. If SSO is required, stop requiring it first.
Disabled The connection can’t be used to sign in. Your verified domains stay.
  • Your provider says the redirect URI or ACS URL doesn’t match. Copy it again from Single sign-on. Each connection has its own address.
  • A person is refused after signing in at your provider. Check that their email address is in a verified domain, that they belong to your organization or have a pending invitation, and that your provider sends their email address.
  • A person is asked to confirm their email on every sign-in. Your provider sends email_verified as false for them. Mark their email as verified in your provider.
  • Nobody can sign in through SSO. Ask your recovery administrator to sign in with their recovery link and stop requiring SSO, then check the provider settings.

Last updated: