Setting up a connection
A connection is an organization’s link to its identity provider, over OpenID Connect or SAML. To set one up, open Settings > Authentication > Identity provider as an organization administrator and give:- the provider’s issuer, client id and client secret, or its SAML metadata
- the email domain the connection signs in
- a test sign-in through the provider
- an administrator who can still sign in if the provider is unavailable
ADMIN_EMAILS adds a domain
without proof. Other organization administrators complete the DNS or file
check.
Before you start
- Activate an Enterprise license. Single sign-on turns on without a restart once the license is active.
- Set
BASE_HOSTandNEXTAUTH_URLto the public HTTPS address people use to open LangWatch. The redirect URI the identity provider calls uses that address. - Keep
CREDENTIALS_SECRETstable across app and worker processes. It encrypts the stored client secrets, and a new value cannot decrypt the existing ones.
Redirect URI
Every connection has its own redirect URI, shown on the setup page:Issuer
Enter the issuer exactly as it appears in theiss claim of the provider’s
ID tokens. When you register the connection, LangWatch fetches
<issuer>/.well-known/openid-configuration and saves the issuer value from
that response, so a trailing slash you typed or left out is corrected. If the
response gives a different issuer, you get an error and the connection is not saved.
Check an issuer by fetching its discovery document:
Replace
YOUR_TENANT_ID with your tenant id, or set ISSUER to your provider’s issuer:
openid,
email and profile scopes. GitHub sign-in is OAuth without OpenID Connect,
so it cannot be a connection.
Microsoft Entra ID
- Register LangWatch as an app in Entra ID and add the redirect URI under the Web platform.
- Use the issuer of the tenant that holds the app registration,
https://login.microsoftonline.com/<tenant id>/v2.0. You cannot register thecommon,organizationsorconsumersendpoints: an ID token from them has the user’s own tenant iniss. - LangWatch reads the address from the
emailclaim, so each user needs a mail address in Entra ID. In Token configuration, add the optionalemailandxms_edovclaims to the ID token.
Existing email and password accounts
On a self-hosted installation, a sign-in through a connection links to an existing email and password account with the same address once the connection has verified the address’s domain. This includes accounts whose address was never confirmed, which is every account on an installation without outbound email. The identity provider does not have to sendemail_verified. Microsoft Entra
ID never sends it, and SAML has no such attribute. A sign-in where the provider
reports the address as unverified, with email_verified: false or with Entra
ID’s xms_edov: false, is refused with “An account with this address already
exists”.
On LangWatch Cloud, a sign-in links to an existing account only when the
address is confirmed and the provider sends email_verified: true.