Choosing the right approach
Use this mapping to decide which option to implement based on how your users access Glean:| Cohort | How users access Glean | Recommended option | Status |
|---|---|---|---|
| A | Users can log into the Glean web app (app.glean.com or <vanity>.glean.com) | Option 1: Glean UI | Available now |
| B | Users interact with Glean through an embedded Web SDK experience | Option 2: Web SDK settings component | Planned |
| C | Users interact with Glean entirely through your own custom UI built on the Client API | Option 3: checkdatasourceauth API | Planned |
Option 1: Glean UI data sources page
Available now

What users do
- Sign in to Glean in the browser (via SSO or other configured auth).
- Navigate to one of:
https://app.glean.com/settings/datasourceshttps://<vanity>.glean.com/settings/datasources
- Find sources like Slack (RTS) or GitHub and click Connect / Authorize.
- Complete the OAuth consent flow with the provider.
Why this is preferred
- No engineering integration work is needed.
- Works for search, chat, and any API clients that act as that user.
- Handles Slack RTS and other per-user sources automatically once the user has authorized them.
Option 2: Web SDK settings component
Planned — targeted availability: EOD 2/27 PST.

Use this when
- You have a first-class user settings or integrations page in your product.
- You want a drop-in UI for per-user auth without sending users to the Glean web app.
- You’re fine using Glean’s UX patterns (labels, flows) in your interface.
High-level integration
- Initialize the Web SDK so Glean can identify the current user (via your existing auth).
- Mount the data sources / settings component on your “Search settings” or “Connect apps” page:
- It lists per-user data sources that need auth for the active user.
- It shows a Connect / Authorize button for each.
- When the user clicks Connect, the Web SDK:
- Starts the appropriate OAuth flow (e.g. Slack, GitHub).
- Handles redirects and token storage via Glean.
- After completion, the component refreshes and marks the source as connected.
Option 3: checkdatasourceauth API
Planned — targeted availability: EOD 2/26 PST.
Endpoint
| Field | Value |
|---|---|
| Method | POST |
| Path | /rest/api/v1/checkdatasourceauth |
| Base URL | https://{instance}-be.glean.com |
| Auth | Bearer Client API token for the authenticated user or service |
Response
The endpoint returns aCheckDatasourceAuthResponse containing an array of unauthorizedDatasourceInstances. Each entry includes:
| Field | Description |
|---|---|
datasourceInstance | Instance identifier (e.g. slack_0, github_enterprise_0) |
displayName | Human-readable name (e.g. “Slack”) |
authStatus | Current per-user auth status: DISABLED, AWAITING_AUTH, AUTHORIZED, STALE_OAUTH, or SEG_MIGRATION |
authUrlRelativePath | Relative OAuth URL for this user + instance, including a one-time transient token |
Example response
Example request
GLEAN_INSTANCEis your tenant instance ID (e.g.acme).GLEAN_API_TOKENis a Client API token that authorizes calls on behalf of the user.
Building your own “Connect apps” UI
A typical headless flow:- Call
checkdatasourceauthas the current user. - For each item in
unauthorizedDatasourceInstances:- Render something like: “Connect Slack”, “Connect GitHub”.
- Construct the full OAuth URL:
https://{instance}-be.glean.com{authUrlRelativePath}
- When the user clicks Connect:
- Redirect them (or open a popup) to that URL.
- They’ll see Glean’s consent screen and then the provider’s OAuth consent.
- After success:
- Show a “Connected” confirmation in your UI.
- Optionally call
checkdatasourceauthagain and verify that the instance no longer appears inunauthorizedDatasourceInstances.
Reauthorization
For most data sources, OAuth is effectively “set it and forget it”: Glean receives a long-lived refresh token and uses it to keep access tokens up to date automatically. Users only need to reauthorize if the provider revokes or expires the refresh token (for example, they revoke the app, their org rotates apps, or the provider enforces a new consent). When that happens, Glean surfaces the source as needing authorization — in the data sources settings UI (Options 1 and 2) or via thecheckdatasourceauth endpoint (Option 3) — so you can prompt users to reconnect.