LibreChat SSO: OIDC, Entra ID, SAML and LDAP

LibreChat's free open-source software includes OpenID Connect with Entra ID, SAML, and LDAP or Active Directory sign-in. Provisioning, SAML logout, and running one protocol at a time need design decisions before approval.

On this page

Does LibreChat SSO meet our identity requirement in the free edition?

LibreChat's free MIT-licensed software supports single sign-on through OpenID Connect, including Microsoft Entra ID, SAML, and LDAP or Active Directory, and none of these methods requires a paid edition. For most organizations, the question is whether the configuration fits the identity requirement. Two constraints come first. Only one of OpenID or SAML can be active at a time, so enabling OpenID automatically disables SAML. The SAML guide also states that Single Logout is not supported and that transient NameID formats are rejected, so confirm your identity provider can send a NameID format LibreChat accepts. The authentication docs describe no SCIM provisioning, which means accounts are created when users first sign in, and your directory cannot push users, groups or deprovisioning events ahead of time. Decide which protocol your identity provider will carry before any configuration work starts.

Three areas need an explicit design decision before approval. The first is sign-out. Because SAML has no Single Logout, test whether ending a session at the identity provider also ends the LibreChat session, and document how long a session stays valid after a user is disabled. The second is MFA. Two-factor authentication in LibreChat applies to local and LDAP accounts and can be made mandatory with ENFORCE_TWO_FACTOR_AUTHENTICATION. Accounts that sign in through OAuth, OpenID Connect or SAML rely on the identity provider for MFA, so the conditional access or MFA policy must be enforced in your identity provider. The third is admin access. The Admin Panel can use the same OpenID Connect provider through an extra redirect URI ending in /api/admin/oauth/openid/callback, and ADMIN_SSO_ONLY hides the email and password form. Decide who holds the ADMIN role, because OPENID_ADMIN_ROLE grants it from an identity provider role or group and role sync cannot assign it.

Use the LibreChat authentication documentation as the detailed reference for which sign-in options each method covers, then confirm the specifics for your identity provider and version with the vendor and your own tests. Before you commit, run a pilot in a non-production deployment. Sign in with test users from each group you plan to map, confirm which role each one receives, check sign-out behavior, and verify the MFA prompt comes from your identity provider. Ask your identity team to confirm how group claims are issued, since Entra ID group membership is read at each login only under the configuration described in the Entra ID guide. If the pilot shows that your sign-out, MFA or admin requirements cannot be met with one protocol, the decision to move to another identity approach should happen before production rollout, not after.

Which LibreChat SSO methods are built in and which need outside work

This table compares each single sign-on method and related sign-in control in the free LibreChat software, with its status and the main limit to plan for. Read the status column first: built in means the feature is configured through LibreChat settings, while an outside component or not available means your identity provider or another tool must supply the missing piece. The main takeaway: OpenID Connect and LDAP are the most complete paths in the free software, SAML carries limits, and SCIM provisioning is not offered.

CapabilityStatusEditionNote
Generic OpenID ConnectBuilt inFree open-source softwareWorks with providers such as Entra ID, Keycloak, Auth0, Authentik and Cognito
Entra ID role and group mappingBuilt inFree open-source softwareRole sync cannot assign ADMIN. Groups are read from Microsoft Graph when OPENID_REUSE_TOKENS is true.
SAMLBuilt inFree open-source softwareCannot run alongside OpenID, since enabling OpenID disables SAML. Transient NameID formats are rejected.
LDAP or Active DirectoryBuilt inFree open-source softwareRequires LDAP_URL and a user search base. Use ldaps or StartTLS and strict certificate checks in production.
Social logins (Google, GitHub, Discord, Facebook, Apple)Built inFree open-source softwareFirst sign-in creates a linked account unless social registration is turned off
Two-factor for local and LDAP accountsBuilt inFree open-source softwareCan be made mandatory with ENFORCE_TWO_FACTOR_AUTHENTICATION
MFA for OpenID and SAML accountsNeeds an outside componentFree open-source softwareYour identity provider must enforce MFA, since LibreChat relies on it for these accounts
Admin Panel SSO with ADMIN_SSO_ONLYBuilt inFree open-source softwareAdmin Panel requires LibreChat v0.8.5 or later. ADMIN_SSO_ONLY hides the email and password form.
SCIM provisioning and SAML Single LogoutNot availableNot offered in the free softwareThe docs describe no SCIM provisioning, and SAML Single Logout is not supported

How LibreChat SSO logins and role mapping flow

The identity provider authenticates the user, and LibreChat decides what that user can do. A person signs in at the identity provider, then returns to LibreChat's OpenID callback. For Entra ID, the callback path is /oauth/openid/callback. On first sign-in, LibreChat creates an account or links the provider identity to an existing one, unless social registration is turned off, so confirm that setting before go-live. Three variables then shape the role at that moment, as the diagram above shows. OPENID_REQUIRED_ROLE is a gate that admits only users who hold a listed role. OPENID_ADMIN_ROLE grants the ADMIN role from an identity provider role or group. OPENID_ROLE_SYNC_ENABLED syncs non-admin roles from the provider.

Role sync can never create an administrator. Admin rights come only from OPENID_ADMIN_ROLE, so the admin group in your identity provider is the control that matters most. Treat that group as privileged: restrict who can add members, review its membership on a fixed schedule, and test that a user removed from it loses ADMIN at the next sign-in. Confirm that behavior in your own environment before relying on it. Also decide before setup which roles the gate should admit, because a user who holds none of the listed roles will be refused at sign-in and will never reach the application.

Server settings, main configuration and the Admin Panel each have their own location and their own redirect URI. Server settings such as the OpenID variables live in the .env file, while the main configuration lives in librechat.yaml, which is optional and can be moved with CONFIG_PATH. The Admin Panel configuration docs describe the Admin Panel as a separate web app that requires LibreChat v0.8.5 or later and can sign in with the same OpenID Connect provider through an extra redirect URI ending in /api/admin/oauth/openid/callback. Register both callback URLs with the provider before testing, or administrators may be unable to sign in to the panel. Set ADMIN_SSO_ONLY only after an administrator has confirmed that SSO works, because it hides the email and password form.

Entra ID sign-in is refused unless the required role is present

The path starts when a user opens LibreChat and is redirected to Entra ID, where the identity provider runs the sign-in and any MFA prompt. The browser then returns to the OpenID callback at /oauth/openid/callback. LibreChat first checks the role named in OPENID_REQUIRED_ROLE. If the user lacks it, the login is refused. Otherwise, a user whose roles or groups match OPENID_ADMIN_ROLE receives ADMIN, and other roles sync only when OPENID_ROLE_SYNC_ENABLED is on. LibreChat then creates or links the local account and grants access. Check which roles and groups reach the token before go-live, because they decide every outcome in this path.

Entra ID sign-in decides access through required, admin and synced roles.

Decisions to make before choosing an SSO method

Each decision below sets who can sign in, what role they receive, who enforces MFA and how administrators recover access if the identity provider fails. They interact, so settle them together before editing the .env file or librechat.yaml. The answers will differ by identity provider and by how your organization manages accounts.

Choose the sign-in protocol

Decide between OpenID Connect, SAML and LDAP or Active Directory first, because the choice sets the configuration path and the account types you can support. Only one of OpenID or SAML can be active, so enabling OpenID disables SAML. The SAML guide states that Single Logout is not supported and transient NameID formats are rejected, and its only worked identity provider example is Auth0. LDAP needs a user search base and, in production, ldaps:// with certificate validation. Confirm your identity provider supports the protocol within these limits.

SAML guide

Map identity provider roles

Decide whether identity provider roles or groups control access to LibreChat. OPENID_REQUIRED_ROLE works as a gate: only users holding a listed role can sign in at all, so a wrong value can block every user at the next login. OPENID_ADMIN_ROLE can grant the ADMIN role from an identity provider role or group, while OPENID_ROLE_SYNC_ENABLED syncs non-admin roles and cannot assign ADMIN. Test the gate with a small set of accounts before wider rollout, and record who may change the admin mapping.

Entra ID guide

Use Entra groups for sharing

If agents, prompts or other resources will be shared with groups, decide whether Entra ID groups will be the sharing unit. With OPENID_REUSE_TOKENS set to true, LibreChat reads each user's group memberships from Microsoft Graph at login and stores each group by its Entra object ID. Group changes therefore take effect at the next sign-in, so confirm how long sessions last and how quickly removals must apply. Confirm that the app registration can read group memberships and that the group count fits your sharing design.

Access control docs

Assign MFA ownership

Decide who enforces multi-factor authentication for each account type. Accounts that sign in through OpenID Connect or SAML rely on the identity provider for MFA, so the identity provider's policy is the control that applies. Local and LDAP accounts use LibreChat two-factor authentication, which can be made mandatory with ENFORCE_TWO_FACTOR_AUTHENTICATION. If you run both local and SSO accounts, map which population gets which control, so no account type falls outside your MFA requirement. Ask your identity team to confirm the provider policy in writing.

Authentication docs

Plan the admin access path

Decide how administrators reach the Admin Panel. The panel can use the same OpenID Connect provider through an extra redirect URI ending in /api/admin/oauth/openid/callback. ADMIN_SSO_ONLY hides the email and password form, so administrators can sign in only through SSO. That removes a local bypass and simplifies audit, but an identity provider outage or a bad redirect can block every administrator. Keep a local break-glass admin account under a documented, tested procedure, and review each use of it.

Admin Panel configuration

How the SSO answer changes by identity provider and network

Entra ID is the OpenID Connect path with the most group decisions, so the first question is whether roles come only from the token or also from Microsoft Graph group reads. Set OPENID_ISSUER to your tenant's v2.0 endpoint and register the callback path before testing any mapping. The Entra ID guide covers the setup itself, so this tab focuses on the decisions behind it.

  • Access gate: OPENID_REQUIRED_ROLE limits sign-in to users who hold a listed role, which is usually the first control a reviewer tests.
  • Admin path: OPENID_ADMIN_ROLE grants the ADMIN role from a provider role or group. OPENID_ROLE_SYNC_ENABLED syncs non-admin roles, and role sync cannot assign ADMIN, so admin access needs its own proof.
  • Graph group reads: With OPENID_REUSE_TOKENS=true, LibreChat reads group memberships from Microsoft Graph at each login and stores each group by its Entra object ID, which is what sharing relies on.
  • Consent and volume: Confirm with the tenant administrator that the Graph access is consented and how many groups a typical user carries, because both shape the login path and the sharing model.

Proof to request: a login from a user in the required role, a login from a user outside it, and the stored group object IDs for a test user.

What order to roll out LibreChat SSO in production

The sequence moves LibreChat SSO from a pinned version and an agreed identity design to tested sign-in, admin access, two-factor rules and offboarding. Each step ends with a check that someone else can repeat and record. The order matters most at the admin stage, where locking out administrators before a tested fallback exists is hard to recover from.

  1. Confirm the LibreChat version and release channel

    Confirm the LibreChat image tag you plan to run in production, the release channel it comes from, and the Admin Panel version. GitHub flags every 2026 release, including v0.8.9, as a pre-release, so the decision to run a pre-release is yours to make and record. The Admin Panel requires v0.8.5 or later. The platform owner signs off on one pinned version, and the test instance and production run that same tag. Done when the version and channel decision are written into the change record.

  2. Choose the protocol and agree claims and groups

    Choose one protocol: OpenID Connect with Entra ID, SAML, or LDAP or Active Directory. Only one of OpenID and SAML can be active, and enabling OpenID turns SAML off. Meet the identity provider owner to agree which claims or groups map to each LibreChat role, which group grants the ADMIN role, and whether a required role limits who can sign in. Record the Entra group object IDs and the exact claim names. Done when the owner has signed off on a claim and group map that matches the roles you plan to test.

  3. Configure a non-production instance

    Build a non-production instance on the same version, with the same configuration keys as production, using your own .env file and librechat.yaml. For Entra ID, set the issuer to your tenant's v2.0 endpoint and register the callback path /oauth/openid/callback. For LDAP, use ldaps:// or StartTLS with a trusted CA certificate and keep LDAP_TLS_REJECT_UNAUTHORIZED set to true. Use test identities only. Done when a test user signs in through the chosen protocol and lands in the application as expected.

  4. Test each role with test accounts

    Sign in with a test account for every role in the agreed map and confirm each one gets the access it should. Include the denied path: when OPENID_REQUIRED_ROLE is in use, an account without the required role should be refused. If you rely on role sync, confirm that a group change is applied at the next sign-in. Confirm that role sync cannot grant ADMIN, so admin access comes only from the admin role setting. Record each test with the account, expected result and actual result. Done when every row matches the map.

  5. Test Admin Panel sign-in and break-glass access

    Register the extra redirect URI for the Admin Panel on the same OpenID Connect application, ending in /api/admin/oauth/openid/callback, and confirm an SSO admin account can sign in to the panel. Decide and test the break-glass path before setting ADMIN_SSO_ONLY, because that setting hides the panel's email and password form. Confirm with the documentation for your version whether the fallback stays reachable with the setting on, and store its credentials in your secrets vault. Then set ADMIN_SSO_ONLY in non-production, retest the SSO admin path, and repeat the same steps in production. Done when both admin paths were tested in the state they will run in.

  6. Enforce two-factor for local and LDAP accounts

    Set ENFORCE_TWO_FACTOR_AUTHENTICATION, because two-factor applies to local and LDAP accounts. Enroll a local test account and an LDAP test account, then confirm each sign-in requires a second factor. OpenID Connect and SAML accounts rely on the identity provider for MFA, so confirm with the identity provider owner that its MFA policy covers every group that uses LibreChat. Export or capture the policy and store it with the test records. Done when both account types require a second factor and the identity provider policy is on file.

  7. Test sign-out and offboarding behavior

    Sign out of LibreChat and confirm the LibreChat session ends. SAML Single Logout is not supported, so check the identity provider's own session settings to see whether its session stays active after a LibreChat sign-out. Disable a test account in the identity provider and confirm it can no longer sign in to LibreChat. The documentation describes no SCIM provisioning, so confirm how an existing LibreChat account, its conversations and any active sessions are handled when access is removed. Done when each result is recorded and the owner accepts the offboarding procedure.

  8. File the evidence from the review table

    File the evidence listed in the review table on this page: the pinned version and channel decision, the claim and group map, the role test results, the admin and break-glass tests, the two-factor settings, the identity provider MFA policy and the offboarding results. Store the files with the change record where security and compliance reviewers can read them. DeployOpen prepares this evidence, but it does not issue audit reports or attestations, so ask your independent auditor which items they need and in what format. Done when the owner has reviewed the set and each row in the table points to a stored file.

What buyers ask before approving LibreChat SSO

Does LibreChat single sign-on need a paid edition?

No. The free LibreChat software includes OpenID Connect, SAML, and LDAP or Active Directory sign-in, and an administrator configures each one in the open-source code. You do not need a paid edition to turn these methods on. What you still need to confirm separately is support: whether a commercial support contract exists, what it covers, and what response commitments apply. Ask for those terms in writing before sign-in becomes a production dependency, because support terms are a separate matter from the software itself. Your legal and procurement teams should also review the license terms that govern the code you deploy.

What does LibreChat SSO setup cost and how long does it take?

No single figure holds across environments, so the answer depends on scope. Cost and duration follow five drivers: the number of identity providers you connect, the role and group model you map into LibreChat, the LDAP topology if directories are involved (one server, replicas, or several domains), the depth of testing across roles and login paths, and the offboarding design for people who leave. Each driver adds configuration, validation and documentation work. DeployOpen agrees a fixed scope, deliverables and timeline in writing before work starts, so ask for a quote built from your list of identity providers, roles and test cases. Ask the quote to separate one-time work (build and testing) from recurring work (upgrades and changes to identity policy).

Can our own identity team set up LibreChat SSO without a partner?

Yes. The authentication documentation is open, so an internal team can configure OpenID Connect, SAML or LDAP without outside help. The deciding question is capacity and skill. Check whether your identity administrators can register the application, set the callback and role claims, handle group lookups and certificates, and test each login path before users depend on it. Plan for test time as well as build time. Also decide who owns the configuration after go-live, who approves identity policy changes, and who responds when a provider secret or certificate expires. For Microsoft Entra ID, the LibreChat Azure Entra ID guide is the natural starting point for your team's review.

Does LibreChat support SCIM user provisioning?

The LibreChat authentication docs describe no SCIM provisioning. Accounts are created when a user first signs in through a linked provider, and the docs describe no scheduled sync that pulls user or group changes from your directory. SCIM is not required for sign-in, but it matters for offboarding. You have two designs. The first places an identity broker or directory-sync service between your identity provider and LibreChat to handle lifecycle events, after you test how it creates, changes and removes accounts. The second is a documented procedure: an owner disables the user at the identity provider, ends active sessions where the provider allows it, and reviews LibreChat's user list on a fixed cadence. Choose based on joiner and leaver volume and on how fast access must end. Confirm how existing accounts and conversations are handled for leavers before you commit.

How do we enforce MFA for every LibreChat user?

Split enforcement by login method. For OpenID Connect and SAML users, the identity provider owns MFA, so set the requirement in your provider's conditional access or authentication policy and scope it to the LibreChat application registration. For local email accounts and LDAP accounts, LibreChat's own two-factor authentication applies, and setting ENFORCE_TWO_FACTOR_AUTHENTICATION makes it mandatory. LDAP users therefore depend on LibreChat's second factor, not on any MFA your directory offers. Decide whether local accounts remain available at all. For the Admin Panel, ADMIN_SSO_ONLY hides the email and password form so administrators must sign in through SSO. Test each login path with a user from each role, and confirm that no path skips the policy you intended.

What does DeployOpen deliver for a LibreChat SSO engagement?

DeployOpen plans, configures, integrates, hardens, documents and supports LibreChat SSO inside your own infrastructure, under a written scope. In practice that covers the choice of login methods, the identity provider and role mapping design, configuration of the chosen methods, integration with your identity provider using test accounts, hardening of the login and admin settings, and documentation your operations team can run. Support after go-live can be set up as a retainer. DeployOpen does not issue audit reports, attestations or certifications. If your assessors need evidence, DeployOpen prepares the systems, controls and records, and the independent auditor or certification body decides what they conclude.

What a security reviewer asks to see for LibreChat SSO

This table lists the evidence a security reviewer typically asks for when LibreChat sign-in is assessed, with where each item comes from and who should produce it. Read each row as a request to place in the evidence folder before the review starts. The main takeaway is that most items come from your identity provider and your own .env and deployment records, so start collecting them early.

EvidenceWhere it comes fromWho produces it
Identity provider app registration and redirect URIsRegistration export listing the LibreChat callback path /oauth/openid/callback and the Admin Panel callback path /api/admin/oauth/openid/callbackClient identity team, checked against the setup by DeployOpen
Configuration and secret handlingDeployed .env values for the OpenID issuer and client secret, with the secret held in the client's secret store and values kept stable across restartsPlatform owner records the values; DeployOpen reviews the file and rotation steps
Role mapping test recordsOne sign-in record per role showing the LibreChat role granted, plus a denied sign-in for a user without the required roleClient test lead; DeployOpen can run and document the tests
Admin Panel sign-in test and ADMIN_SSO_ONLY decisionTest showing an admin signing in through SSO to the Admin Panel, and a signed decision on whether ADMIN_SSO_ONLY is setClient security owner signs the decision; platform owner runs the test
Two-factor enforcement and identity provider MFA policyENFORCE_TWO_FACTOR_AUTHENTICATION setting for local and LDAP accounts, plus the identity provider MFA policy that covers SSO usersPlatform owner for the setting; client identity team for the policy
LDAP TLS verification (if LDAP is enabled)LDAP_TLS_REJECT_UNAUTHORIZED value, LDAP_CA_CERT_PATH and whether connections use ldaps or StartTLSDirectory team confirms the CA; platform owner records the .env values
LibreChat version and release channelDeployed image tag, the matching GitHub release and the channel chosen, since GitHub flags every 2026 release as a pre-releasePlatform owner records the version; DeployOpen confirms the upgrade path
Account creation and linking settingsSocial registration setting and a first-sign-in test showing whether the provider creates a linked accountPlatform owner runs the test; security lead approves the setting
Offboarding, access review and admin change recordsWritten offboarding steps, periodic access review exports, and admin change records that point to the RBAC grant audit logClient HR and identity team; platform admins keep the change records

How DeployOpen scopes and delivers LibreChat SSO in your environment

DeployOpen treats LibreChat SSO as a design decision made before anything is configured: which protocol your identity provider supports, who gets admin rights, and how access is revoked. We plan, configure, test and document the sign-in path inside your own infrastructure, under a written scope agreed before work starts. The result is a setup your identity and security teams can review and operate.

How we scope

  • The written scope names each method in use: OpenID Connect, Entra ID, SAML, LDAP or Active Directory.
  • We confirm which identity provider roles or groups grant LibreChat admin access and which sync non-admin roles.
  • Engagements are fixed-scope, and ongoing support is available under a retainer.

How we build

  • We configure the OpenID Connect issuer, callback path and required role for your tenant inside your own infrastructure.
  • We test Entra ID group membership reads from Microsoft Graph, which LibreChat stores by Entra object ID for sharing.
  • For LDAP or Active Directory, we set LDAPS or StartTLS, certificate trust and TLS verification before any user signs in.

How we hand over

  • Documented deliverables cover the SSO settings in use, the role mapping and the admin sign-in path.
  • Two-factor rules are documented: ENFORCE_TWO_FACTOR_AUTHENTICATION covers local and LDAP accounts, and OIDC or SAML users rely on their provider.
  • Your team receives a go-live checklist covering identity provider settings and SAML limits, including no Single Logout.

How we support

  • Under a retainer, we can handle identity provider changes, certificate renewal and upgrades that touch sign-in settings.
  • Re-test sign-in paths after each LibreChat upgrade and after identity provider changes, using the same written test cases.
  • Admin and role mapping reviews can sit in a retainer, so directory group changes stay aligned with LibreChat access.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.