
LMS SSO for B2B training: letting client staff log in with company accounts
LMS SSO for a training provider means each client company’s staff sign in to your platform with the work account their own employer manages, using SAML 2.0 or OpenID Connect. The protocol is the easy part. The hard part is running many separate client identity providers safely: routing each person to the right one, linking logins to learner records, and removing people who leave.
Most SSO guides we reviewed in November 2026 describe one organization signing its own workforce in to one LMS. A training provider has the opposite shape: many client companies, each with its own IT team, plus learners who booked a public seat with a personal email. This guide covers the design decisions that follow.
Key takeaways
- Store one SSO connection per client, with its own protocol, signing keys, verified domains and provisioning mode.
- Support SAML 2.0 and OpenID Connect, and validate signature, issuer, audience, expiry and replay on every login.
- Link logins by issuer plus subject identifier, never by email alone, and create accounts only for domains the client has proven it owns.
- Just-in-time provisioning creates people but never removes them; use SCIM, or an explicit offboarding step, for leavers.
- Decide session lifetime and logout behavior yourself, because the identity provider does not decide them for you.
What does LMS SSO mean when your customers are other companies?
In B2B training, your platform is the relying party and each client’s identity provider (IdP) proves who the user is. The client’s IT team owns the accounts, passwords and multi-factor rules. Your platform owns the training records, enrolments and certificates. Neither side should copy the other’s job.
Every client is a separate trust relationship with its own keys, domains and quirks, so the data model has to hold many connections, not one. Some people will have no client identity at all: freelance trainers, individuals who pay personally, and staff at clients with no IdP. Keep a non-SSO login for them.
Should you use SAML 2.0 or OpenID Connect for LMS SSO?
Support both if you can, because client IT teams will ask for whichever their IdP handles best. SAML 2.0 passes a signed XML assertion through the browser; OpenID Connect passes a signed JSON Web Token (JWT) called an ID token. Both prove identity; they differ in format, replay defense and logout.
| Aspect | SAML 2.0 (Web Browser SSO) | OpenID Connect (authorization code flow) |
|---|---|---|
| What proves identity | A signed XML assertion in a Response; the assertion must be signed when the POST binding is used | An ID token (JWT) whose signature you validate against the issuer’s keys |
| Trust anchor you store per client | The IdP’s entity identifier and signing certificate | The issuer identifier and where to fetch its keys |
| Replay defense | Remember assertion IDs until they expire; match InResponseTo to your request | Send a nonce and check it comes back; reject expired tokens |
| Stable user key | The NameID or an attribute you agree on with the client | The sub claim, unique within the issuer |
| Logout | A Single Logout protocol exists; check each IdP supports it | Back-channel logout sends your platform a signed logout token |
The table is our own comparison, built from the specifications cited below. Ask each client which protocol they prefer early in onboarding instead of assuming.
What must your platform check on every SAML response?
Your platform must verify the signature, the audience, the recipient, the expiry and replay before it trusts a SAML login. The OASIS SAML 2.0 profiles specification sets these rules for the Web Browser SSO profile.
- Verify signatures on the assertion or response. Assertions in a POST-binding response must be signed (sections 4.1.3.5 and 4.1.4.5).
- Confirm the assertion’s AudienceRestriction includes your service provider’s unique identifier (section 4.1.4.2).
- Confirm the bearer Recipient matches the assertion consumer service URL that received the response (section 4.1.4.3).
- Confirm NotOnOrAfter has not passed, allowing for modest clock skew (section 4.1.4.3).
- Match InResponseTo to the ID of the request you sent, unless the login is unsolicited (section 4.1.4.3).
- Keep the IDs of used assertions until they expire, because the profile says you MUST ensure bearer assertions are not replayed (section 4.1.4.5).
The OWASP SAML Security Cheat Sheet adds the implementation traps. Confirm the signature reference resolves to the assertion you actually read, which blocks XML signature wrapping. Ignore key data embedded in the message and use the certificate you stored for that client.
What must your platform check on every OpenID Connect ID token?
Validate the issuer, audience, signature, expiry and nonce before accepting an ID token. The OpenID Connect Core specification lists these in its ID token validation rules for the authorization code flow, and each one closes a specific forgery or replay route.
- The
issvalue must exactly match the issuer you configured for that client. - Your client ID must be among the token’s audiences, and tokens listing untrusted extra audiences must be rejected.
- The signature must validate using the keys the issuer provides. Reject the
nonealgorithm; the specification allows it only if the client asked for it at registration. - The current time must be before
exp, and if you sent anonce, it must come back unchanged. - The redirect URI must exactly match one you pre-registered, compared as a simple string.
Pro tip: Write the rejection tests first. Build a fake client IdP for your test suite that can mint a response with the wrong audience, an expired time, a replayed ID, a missing signature and a tampered body. A login that accepts any of those is a defect, and finding it in CI is cheaper than finding it in an audit.
How do you configure a separate identity provider for each client?
Create a connection record per client and key every lookup on its ID. Each record holds that client’s protocol, trust anchors, domains and rules. The login endpoint for a connection should only accept responses that were issued by that connection’s IdP and signed with that connection’s keys.
| Field on the connection | Why it is per client |
|---|---|
| Tenant and connection ID | Ties every login, identity and audit event to one client |
| Protocol and issuer or entity ID | Each IdP names itself differently, and you compare it exactly |
| Current and next signing key | Clients rotate keys on their own schedule; accept both during the overlap |
| Your callback URL for this connection | A per-connection URL (for example /sso/{connection_id}/acs) binds a response to one client |
| Verified email domains | Controls who may sign in and which accounts may be created |
| Provisioning mode | Just in time, SCIM, or invite-only, chosen by the client’s IT policy |
| Attribute and group mapping | Maps the client’s groups to your roles, such as learner or client admin |
| Enforcement | SSO required, or SSO optional with a password fallback |
This is a design checklist, not a vendor standard. With a per-connection callback, you verify against the key stored for that one connection, so a client’s IdP cannot sign a login that lands in another client’s tenant.
Request only the attributes you need: name, email, a stable identifier and perhaps a group. Extra attributes add personal data to your records; see data privacy duties for training platforms.
How do you send each person to the right company’s login?
Ask for the work email first, look up its domain, and redirect to the connection that has verified that domain. This is often called home realm discovery. If no connection owns the domain, show the normal login. One verified domain may belong to only one client connection.
Domain verification is what makes this safe. Before a connection can claim acme.example, the client should prove control of it, typically by publishing a DNS record you specify. Treat the email address as a hint, not proof.
Should you allow IdP-initiated login?
Offer it only if a client insists, and treat it as the weaker option. The user starts at the identity provider, so your platform never issued a request to match against. The SAML profile allows these unsolicited responses (section 4.1.5). OWASP calls the flow less secure by design; if you enable it, allowlist the RelayState destination and keep the replay checks.
How do you link an SSO login to the right learner account?
Link on the pair of connection and subject identifier, and fall back to email only under strict conditions. In OpenID Connect, sub is a locally unique, never-reassigned identifier within its issuer, so the pair is stable even when a person changes name or email.
Email is tempting because learners are already keyed by it. It is also where account takeover creeps in: many identity providers let an administrator create a user with any email address. Merge on email alone, and that administrator can sign in to an existing learner’s account, even one at a different company.
The rules below are our recommended order. The function that follows implements them.
- If the connection and subject are already linked, sign that user in.
- If the email domain is not verified for this connection, reject the login.
- If no account has that email, create one and link it (just-in-time provisioning).
- If an account exists in the same client tenant, link it.
- If the account came from elsewhere, such as a public booking, require proof of inbox control before linking.
def resolve_login(conn, subject, email, identities, users):
key = (conn["id"], subject)
if key in identities: # 1. known identity wins
return ("login", identities[key])
email = email.strip().lower()
domain = email.rpartition("@")[2]
if domain not in conn["verified_domains"]: # 2. domain not proven
return ("reject", "domain_not_verified")
existing = users.get(email)
if existing is None: # 3. just-in-time create
return ("create_and_link", None)
if existing["tenant_id"] == conn["tenant_id"]: # 4. same client: link
return ("link", existing["id"])
return ("verify_inbox", existing["id"]) # 5. account from elsewhere
We ran this function against six cases in a Python sandbox: a known identity, a same-tenant link, a cross-tenant account, a new user, an unverified domain and an email with stray capitals and spaces. All six returned the expected result. That is a unit test of the rules only, not a full login flow.
Should you provision learners just in time or with SCIM?
Use just-in-time (JIT) provisioning to create accounts at first login, and add SCIM when clients need people removed or updated automatically. JIT runs only when someone signs in, so it cannot tell you that a person left. SCIM lets the client’s IdP push creates, updates and deactivations to you.
| Question | Just-in-time | SCIM | Invite or roster upload |
|---|---|---|---|
| When does the account appear? | At first login | When the client assigns the user in its IdP | When someone imports or invites |
| Does it remove leavers? | No, there is no event | Yes, through deactivation | Only if someone remembers |
| What do you build? | Login-time account creation | A SCIM server with per-client credentials | An import and invite flow |
| Main risk | Wrong-account linking | Stale or duplicate records if matching is loose | Lists go stale |
With SCIM, the client’s IdP calls an endpoint you host. Microsoft’s Entra guide to building a SCIM endpoint (updated September 2026) shows what that means in practice. Your server handles user create, query and PATCH calls, and responds with application/scim+json over HTTPS.
The same guide notes three details that matter to a multi-client provider. Entra sends deactivation as a PATCH setting active to false, and expects you to keep returning that user. Incremental syncs run roughly every 40 minutes, so removal is not instant. With OAuth client credentials, each customer must supply its own; one app-wide pair is not supported.
Pro tip: Deactivate, never delete. A leaver’s attendance, results and certificates may be needed for audits or client disputes. On a SCIM deactivation, block login and free the seat, but keep the learner record and its history. Keep your own deletion rules for privacy requests separate from IdP offboarding.
What happens at logout, session expiry and IdP outages?
Your platform sets its own session lifetime, and a client’s IdP cannot end it unless you implement logout. In SAML, the assertion’s SessionNotOnOrAfter has no required relationship to its NotOnOrAfter validity window, so one number tells you nothing about the other. Choose a lifetime and test it.
For OpenID Connect, back-channel logout lets the provider send your platform a signed logout token. The OpenID Connect Back-Channel Logout specification requires you to validate it like an ID token and to check that it contains the logout event, a sub or sid, and no nonce.
Classroom delivery adds cases the generic guides skip. Shared kiosk laptops and borrowed devices need short sessions and an explicit sign-out button. If a client’s IdP is down, new logins fail. Decide per client whether a password fallback is allowed, since an always-on fallback undermines an SSO-required policy.
What does a client SSO onboarding checklist look like?
Run the same eight-step checklist for every client, so SSO becomes a repeatable service instead of a custom project. Each step settles one decision with the client’s IT contact, and the pilot test comes before the connection is switched on for everyone.
- Confirm the protocol the client prefers and whether it needs IdP-initiated login.
- Exchange the callback URL and identifier for their connection against the client’s issuer and keys.
- Verify each email domain the client will use before enabling the connection.
- Agree the attributes sent, the stable identifier, and how groups map to roles.
- Choose provisioning: JIT, SCIM or invite, and who offboards leavers.
- Test with a pilot user, including a wrong-account and an expired-session case.
- Decide enforcement, fallback login, session length, key rotation dates and an owner on both sides.
What should you do next?
Pick your three largest clients and write down, for each, the IdP they use, the protocol they would choose and how they offboard staff today. That list tells you whether to build SAML, OpenID Connect, SCIM or all three first. Then draft the connection record and the rejection tests before any code.
If you are comparing platforms instead of building, ask each vendor which protocols it supports per client, how provisioning and leavers work, and how keys are rotated. SimpliTrain’s integrations page describes SSO as rolling out across its ecosystem, so ask the team for current specifics; you can also request a demo. For the integration side of a custom build, see our note on API-first training platforms.
Frequently asked questions
Is SAML or OpenID Connect better for LMS SSO?
Neither wins everywhere. SAML 2.0 is widely used by corporate identity providers, while OpenID Connect uses JSON tokens that suit modern apps. For B2B training, support whichever your clients’ IT teams already run, validate each protocol’s checks fully, and avoid forcing a client to switch.
Do we need SCIM if we already have just-in-time provisioning?
Only if clients expect automatic updates and removal. Just-in-time provisioning creates an account at first login but never learns that someone left. Without SCIM, you need another offboarding route, such as client admins removing people or periodic roster checks, or old accounts will pile up.
Can we offer SSO to some clients and passwords to others?
Yes, and you should. Make SSO a per-client setting, with an enforcement flag. Clients that require SSO block password login for their domain, while others keep passwords. Individuals who book public seats and freelance trainers still need a non-SSO route, since they have no client identity provider.
Should we match SSO users to existing accounts by email?
Not on email alone. Email is a hint, not proof of ownership, and a client’s IdP administrator can create a user with any address. Match on connection and subject first, require a verified domain, and ask for proof of inbox control when the existing account came from elsewhere.
What happens if a client’s identity provider goes down?
People already signed in can usually continue until their session expires, but new SSO logins fail. Decide in advance whether that client gets a temporary password or magic-link fallback. A fallback keeps classes running but weakens an SSO-required policy, so agree it with the client’s IT team beforehand.
Tags :
