> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Glean OAuth 2.0 (Multiple Companies) connector profile – StackOne setup guide

> Set up a connector profile using OAuth 2.0 (Multiple Companies) for Glean in StackOne to allow users to link their accounts.

> [!WARNING]
>
> An OAuth client registered on your Glean instance is required. Static registration needs Glean admin access. Dynamic registration does not, but yields a restricted scope set.

Select Actions to adjust the guideSome actions may require additional configuration in the provider to be accessible. Choose the actions you need and the guide will be updated.

Select all
Clear

ActionScope(s)

Loading actions...No actions match your search.

Dynamic Guide URL

Copy URL

Scopes Selected

<pre role="textbox" aria-readonly="true" tabIndex="0" />

Separator

Copy scopes

## Prerequisites

Confirm what you need before starting setup.

<ul>
  <li>Your Glean instance name, found under **About Glean** in the Admin Console</li>
  <li>A Glean admin has enabled the Glean OAuth Server in the Admin Console under **Settings** then **Third-party access (OAuth)**</li>
  <li>Glean admin access if you want to register a static OAuth client</li>
</ul>

## Register an OAuth client

The connector needs a Client ID and Client Secret for your Glean instance. There are two ways to obtain them.

**1. Create a static client (recommended)**

Enables actions: Add Collection Items, Add Verification Reminder, Authorize Action Pack, Authorize Tool Server, Autocomplete, Call Tool, Chat, Check Datasource Authorization, Create Announcement, Create Answer, Create Authentication Token, Create Collection, Create Data Loss Prevention Policy, Create Findings Export, Create One Time Report, Create Pin, Create Shortcut, Delete All Chats, Delete Announcement, Delete Answer, Delete Chat Files, Delete Chats, Delete Collection, Delete Collection Item, Delete Findings Export, Delete Pin, Delete Shortcut, Delete Skill, Get Action Pack Auth Status, Get Agent, Get Agent Schemas, Get Answer, Get Chat, Get Chat Application, Get Chat Files, Get Collection, Get Data Loss Prevention Policy, Get Datasource Credential Status, Get Datasource Instance Configuration, Get Document Permissions, Get Document Visibility Overrides, Get Documents, Get Feed, Get Insights, Get People, Get Pin, Get Recommendations, Get Report Status, Get Shortcut, Get Skill, Get Skill Version, Get Tool Server Auth Status, Get Tool Server Tools, Import Skills, List Agents, List Chats, List Collections, List Data Loss Prevention Policies, List Documents By Facets, List Entities, List Findings Exports, List Pins, List Shortcuts, List Skill Versions, List Skills, List Tools, List Verifications, Preview Skill Source, Report Activity, Report Feedback, Rotate Datasource Credentials, Run Agent, Search, Set Document Visibility Overrides, Summarize, Sync Skill, Update Announcement, Update Answer, Update Collection, Update Collection Item, Update Data Loss Prevention Policy, Update Datasource Instance Configuration, Update Pin, Update Shortcut, Update Skill, Verify Document

Register the client in the Glean Admin Console. This path needs admin access and can be allow-listed for the full scope set.

<ul>
  <li>Sign in to the Glean Admin Console</li>
  <li>Go to **Users & permissions** then **Third-party access (OAuth)**</li>
  <li>Under **Static clients**, click **Create client**</li>
  <li>Enter a client name and the redirect URI below</li>
  <li>Select the scopes the client is allowed to request</li>
  <li>Copy the Client ID and Client Secret. The secret is shown once and cannot be retrieved again</li>
</ul>

<ul>
  <li>
    activity
  </li>

  <li>
    admin
  </li>

  <li>
    agents
  </li>

  <li>
    announcements
  </li>

  <li>
    answers
  </li>

  <li>
    auth\_token\_creator
  </li>

  <li>
    chat
  </li>

  <li>
    collections
  </li>

  <li>
    content\_hiding
  </li>

  <li>
    data\_governance
  </li>

  <li>
    docpermissions
  </li>

  <li>
    documents
  </li>

  <li>
    entities
  </li>

  <li>
    feed
  </li>

  <li>
    feedback
  </li>

  <li>
    insights
  </li>

  <li>
    offline\_access
  </li>

  <li>
    people
  </li>

  <li>
    pins
  </li>

  <li>
    search
  </li>

  <li>
    shortcuts
  </li>

  <li>
    skills
  </li>

  <li>
    summarize
  </li>

  <li>
    tools
  </li>

  <li>
    verification
  </li>
</ul>

**2. Or register a dynamic client**

Dynamic client registration follows [RFC 7591](https://datatracker.ietf.org/doc/html/rfc7591) and needs no admin access.

<ul>
  <li>POST a registration request to `https://{instance}-be.glean.com/oauth/register`, including the redirect URI below</li>
  <li>Glean applies a restricted scope set to dynamically registered clients, and the exact set is configured per tenant, so a dynamic client may not be able to obtain every scope listed above</li>
  <li>If that set excludes offline\_access, no refresh token is issued and the connection must be re-authorized once the access token expires. Ask your Glean representative to widen the set</li>
  <li>An admin can disable dynamic registration on the instance</li>
</ul>

**3. Configure the redirect URI and grant**

Glean runs an OAuth 2.1 implementation, so these values are fixed.

<ul>
  <li>Redirect URI: the **Callback URL** from your Connector Profile</li>
  <li>Grant type: authorization code with PKCE using S256. Implicit and password grants are not supported</li>
  <li>Token endpoint auth method: client\_secret\_post, so the client secret travels in the token request body</li>
</ul>

**4. Set the connector scopes**

Back in StackOne, paste the space-separated scope list your OAuth client is allowed to request into the **Scopes** field.

<ul>
  <li>Leaving **Scopes** empty requests every scope the connector supports, which suits a static client allow-listed for the full set</li>
  <li>Dynamically registered clients hold a restricted scope set, so enter that set explicitly rather than leaving the field empty</li>
  <li>Requesting a scope the client cannot hold can fail authorization, and any action whose scope was not requested fails with a 403</li>
</ul>

## Find your instance name

Sign in to the Glean Admin Console and open **About Glean** (`https://app.glean.com/admin/about-glean`). The connector uses this value to build the API base URL and both OAuth endpoints, all of which are per-instance.

## Create the StackOne Connector Profile

**1. Create a Connector Profile**

Enable the connector and create a Connector Profile in your project. See [Setup Connector Profile](https://docs.stackone.com/gateway/quickstart.md#setup-connector-profile).

**2. Link an Account**

Once the Connector Profile is created, continue to [link an account](https://docs.stackone.com/connectors/glean/guides/link-account/oauth-2-0-multiple-companies.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.