Set up single sign-on
(Updated: )Single sign-on (SSO) lets members of your Leebry organization sign in through your identity provider (IdP) instead of using Leebry user name and password. Once SSO is configured, users with email addresses on a verified domain can authenticate through the IdP and return to Leebry after successful sign-in.
Prerequisites
Before setting up SSO, make sure that:
You use the following redirect URI for Leebry in your IdP:
https://sso.leebry.ai/api/oauth/oidcThe email domain used by your organization is verified in Leebry.
Setup overview
SSO setup consists of the following steps:
Create an OpenID Connect (OIDC) web application, add the Leebry redirect URI, and get the required information: Discovery URL, Client ID, and Client Secret.
Connect your SSO provider in Leebry.
Test the SSO sign-in flow and confirm that it works as expected.
Required OIDC scope
Leebry uses the standard OIDC sign-in flow and requires the openid scope. No additional scopes, such as email or profile, are required by Leebry unless they're required by your organization's policies or IdP configuration.
Create an OIDC web application
Create a confidential OIDC web client in your IdP, such as Okta, Google Workspace, Microsoft Entra ID, or another provider. You'll need the following values when connecting the IdP to Leebry:
- Discovery URL — the OIDC metadata URL, usually ending in
/.well-known/openid-configuration - Client ID — the identifier assigned to the OIDC application
- Client Secret — the secret generated for the OIDC application
Okta
Sign in to the Okta Admin Console.
Go to Applications > Applications.
Click Create App Integration.
Select "OIDC — OpenID Connect" as the sign-in method and "Web Application" as the application type.
Add the following sign-in redirect URI:
https://sso.leebry.ai/api/oauth/oidcSave the app.
Copy the Client ID and Client Secret.
Assign the users or groups who should be able to use SSO to the app.
For Okta, use one of the following Discovery URLs depending on the authorization server:
| Authorization server | Discovery URL |
|---|---|
| Organization authorization server | https://{yourOktaDomain}/.well-known/openid-configuration |
| Custom authorization server | https://{yourOktaDomain}/oauth2/{authorizationServerId}/.well-known/openid-configuration |
Replace {yourOktaDomain} and {authorizationServerId} with the corresponding values from your Okta organization. Okta documents these as the OIDC discovery endpoints for its organization and custom authorization servers.
Google Workspace
Open the Google Cloud Console and select or create a project.
Configure the OAuth consent screen.
Create an OAuth client ID for a web application.
Configure the authorized domains required by your Google Cloud project.
Add the following authorized redirect URI:
https://sso.leebry.ai/api/oauth/oidcCreate the client and copy the Client ID and Client Secret.
Google provides the following Discovery URL:
https://accounts.google.com/.well-known/openid-configurationConfigure the consent screen and account access restrictions according to your organization's requirements. If the app is intended only for company-managed accounts, make sure the Google OAuth configuration restricts access accordingly.
Microsoft Entra ID
Sign in to the Microsoft Entra admin center.
Go to Entra ID > App registrations > New registration.
Register the application and add the following redirect URI:
https://sso.leebry.ai/api/oauth/oidcCopy the Application (client) ID and Directory (tenant) ID.
Create a client secret and copy its value immediately.
Use the following Discovery URL, replacing {tenantId} with your tenant ID or verified tenant domain:
https://login.microsoftonline.com/{tenantId}/v2.0/.well-known/openid-configurationMicrosoft documents /.well-known/openid-configuration as the OpenID Connect metadata endpoint appended to the tenant-specific authority URL.
Other providers
Create a confidential OIDC web client that uses the Authorization Code flow.
Set the redirect URI to
https://sso.leebry.ai/api/oauth/oidcGenerate a Client ID and Client Secret.
Find the issuer's Discovery URL (OIDC metadata URL), which typically ends with
/.well-known/openid-configuration.
Connect SSO provider in Leebry
Before connecting the provider, make sure your company domain is verified in Leebry and that you have the required information (Discovery URL, Client ID, and Client Secret) from your IdP.
Sign in to Leebry as an organization admin.
In the bottom-left corner, click your user name, then choose SSO Settings.
On the Single Sign-On tab, click Add SSO Provider.
Select your IdP: Okta, Google Workspace, Microsoft Entra ID, or Other.
Enter the required information, then click Connect.
After the connection becomes active, click Done.
Leebry confirms that SSO has been connected.
Required fields
| Field | What to enter |
|---|---|
| Discovery URL | The full OIDC discovery URL provided by your IdP |
| Client ID | The client or application ID assigned by your IdP |
| Client Secret | The client secret generated for your IdP application |
Test SSO sign-in
After connecting the IdP, test the SSO flow from sign-in to authentication.
Sign out of Leebry or open a private or incognito browser window.
Go to the Leebry sign-in page.
Enter a work email address that uses your verified domain, such as
[email protected].Click "Sign in with SSO".
Authenticate through your IdP.
Confirm that you're redirected back to Leebry and signed in successfully.
During the first SSO sign-in, an existing Leebry account that uses password-based authentication may ask you to confirm the password once to link the account to the SSO identity.
Troubleshooting
| Symptom | What to check |
|---|---|
| The "Sign in with SSO" button isn't available | Make sure the email domain is verified in Leebry and matches the domain configured for SSO. |
| SSO connection shows Paused | Verify the domain again or add a verified domain under SSO Settings > Verified Domains in Leebry. |
| Redirect mismatch error | Confirm that the redirect URI in your IdP exactly matches https://sso.leebry.ai/api/oauth/oidc, including the scheme and path, with no trailing slash or additional parameters. |
| Invalid client or secret error | Make sure the Client ID and Client Secret in Leebry match the values in the IdP application. Generate a new secret if necessary. |
| Discovery or issuer error | Make sure the full OIDC Discovery URL is entered. For Microsoft Entra ID, make sure the URL includes /v2.0. |
| User authenticates but can't access Leebry | Verify that the user is assigned to the application in Okta, included in the allowed audience or organization in Google Workspace, or permitted by the relevant tenant and account settings in Microsoft Entra ID. |