Single Sign-On
Let your team sign in to LendAPI with your identity provider over OpenID Connect, and map identity-provider groups to LendAPI roles.
Single sign-on (SSO) lets your team sign in to the LendAPI dashboard with the accounts they already use at work, such as Okta, Microsoft Entra ID or Amazon Cognito. You manage who has access, and which role they get, in your identity provider instead of creating each user by hand in LendAPI.
LendAPI supports SSO over OpenID Connect (OIDC). SAML is not supported.
Key concepts
- Identity provider (IdP): the system that holds your users and passwords, such as Okta, Microsoft Entra ID or Amazon Cognito.
- OIDC application: the app you register in your IdP for LendAPI. It gives you a client ID and client secret.
- Issuer URL: your IdP's base OIDC address. LendAPI reads its discovery document (
/.well-known/openid-configuration) to find the sign-in, token and key endpoints. - Callback URL: the LendAPI address your IdP sends users back to after they sign in. Also called the redirect URI or sign-in redirect URI.
- SSO group: a group your IdP includes in the user's ID token.
- Group mapping: a rule that gives users in an SSO group a specific LendAPI role.
How SSO sign-in works
Users sign in on your identity provider's sign-in page for the LendAPI app. After they sign in, the identity provider sends them back to LendAPI's callback URL, and LendAPI signs them in to the dashboard.
sequenceDiagram
participant U as User
participant IdP as Identity provider
participant L as LendAPI
U->>IdP: Sign in to the LendAPI app
IdP->>L: Return to the callback URL with a code
L->>IdP: Exchange the code for an ID token
L->>L: Verify token, find or create the user, apply group mapping
L->>U: Signed in to the dashboard
On each SSO sign-in, LendAPI:
- Verifies the ID token's signature against your IdP's published keys and checks that it was issued for your client ID.
- Finds the LendAPI user with the token's
email. If none exists, it creates one in your workspace. - Reads the user's groups from the token and gives the user the role from the first matching group mapping.
Set it up in the dashboard
Before you start
- You need Settings → Security: Edit in LendAPI (Admins have it).
- Make the change in Live mode. In Sandbox mode, the Security page saves to Sandbox only and does not affect Production sign-in.
- Your IdP must issue an ID token signed with RS256 that contains an
emailclaim. - Decide which IdP groups should map to which LendAPI roles (see Roles and Permissions).
1. Copy your callback URL
- Go to Settings → Security.
- Turn on Single Sign On.
- Under OIDC Callback URL, copy the URL. It looks like
https://<your LendAPI domain>/sso/callback/<workspace ID>.
2. Register LendAPI in your identity provider
In your IdP, create an OIDC web application (authorization code flow, with a client secret) and set:
| IdP setting | Value |
|---|---|
| Sign-in redirect URI / Redirect URI / Callback URL | The OIDC Callback URL from step 1. |
| Scopes | openid, profile, email |
| Groups in the ID token | Include the user's groups in the ID token. |
Then assign the app to the people or groups who should have access, and note the client ID, client secret and issuer URL.
Provider notes:
- Groups claim:
groups - Add a groups claim to the ID token.
- Use the Okta authorization server URL as the issuer.
- Groups claim:
groups - Configure group claims for the ID token.
- Entra sends group object IDs, so enter the group object ID in the mapping, not the display name.
- Groups claim:
cognito:groups - Cognito includes the user's groups automatically.
- The issuer is your user pool's address, for example
cognito-idp.us-east-1.amazonaws.com/<user pool ID>.
If users sign in but their group claims don't reach LendAPI, contact LendAPI support.
3. Enter your IdP details in LendAPI
Back in Settings → Security, under OIDC Details of IDP:
- Provider Name: a label for your IdP, for example
Okta. - Client ID: from your IdP app.
- Client Secret: from your IdP app. It is stored encrypted.
- Issuer URL: your IdP's issuer, with or without
https://. LendAPI always uses HTTPS.
4. Map SSO groups to roles
Under SSO Group Mapping, add one row per group:
- In SSO Group, enter the group name exactly as your IdP sends it. Group names are case-sensitive.
- In Applicant Role, choose the LendAPI role to give users in that group.
- Add more rows as needed.
If a user is in several mapped groups, the first matching row wins, so order your rows deliberately.
5. Save and test
- Click Save on the Security page.
- In a private browser window, sign in to the LendAPI app through your identity provider.
- Confirm you land in the LendAPI dashboard with the expected role.
To turn SSO off, switch off Single Sign On and click Save. Your configuration is kept.
After setup
What happens to users
| Situation | Result |
|---|---|
| First SSO sign-in, no LendAPI account yet | An account is created in your workspace and given the role from the matching group mapping. |
| Existing user in your workspace | They sign in to their existing account and are given the role from the matching group mapping. |
| No mapping matches | LendAPI does not assign a role. Map every group you assign to the app so new users get a role. |
Users created through SSO do not have a LendAPI password. Removing someone from the LendAPI app in your IdP stops them signing in through SSO, but does not disable their LendAPI account; disable it in Settings → Users too. See Users and Teams.
API access
SSO is configured in the dashboard only. It is not part of the public REST API, and it does not affect API keys.
Required permissions
Configuring SSO and two-factor authentication requires Settings → Security: Edit. See Roles and Permissions.
Troubleshooting
| Symptom | Likely cause |
|---|---|
| "Invalid configuration" after signing in | SSO is switched off, or LendAPI cannot read the issuer's discovery document. Check the Issuer URL. |
| "Token exchange failed" | Wrong client secret, or the redirect URI in your IdP does not exactly match the OIDC Callback URL. |
| "Token decode failed" | The ID token is not signed with RS256, or the client ID does not match. |
| User signs in but has the wrong role | The group is not in the ID token, the name differs in case, or an earlier mapping row matched first. |
Best practices
- Map every group you assign to the app, so every new user gets a role on first sign-in.
- Keep at least one Admin who can sign in with a password in case your IdP is unavailable.
- Order mappings from most to least specific. The first match wins.
- Offboard in both places: remove the user in your IdP and disable them in LendAPI.
- Turn on multi-factor authentication in your IdP for users who sign in with SSO.
Related guides
Updated 13 minutes ago

