How can we help?

Sourcegraph Integration

Netanel Hugi
Netanel Hugi
  • Updated
Torii SMP
Torii Identity

Overview

Torii integrates with Sourcegraph and syncs:

User Fields License Types
Name, Email, Role, Status, Creation date, Last used date Sourcegraph
  • You can constantly stay updated with application information from our Integrations Page >> Integration Capabilities button >> Integration Capabilities table.

Requirements

Accounts & Permissions

To connect this integration, we require the following:

  • A Sourcegraph Enterprise plan. Torii connects to your own Sourcegraph instance, self-hosted or Sourcegraph Cloud.
  • A Sourcegraph site admin who can create an access token. Listing all users and running the workflow actions (Create user, Change user role, Delete user) require site admin.

Required keys

  • Instance URL: the address of your Sourcegraph instance, for example https://sourcegraph.example.com (no trailing slash or path).
  • Access Token: an access token of a site admin user.

How to Generate the Required Values

Step 1: Create an access token

  1. Sign in to your Sourcegraph instance as a site admin.
  2. Click your avatar at the top right of the page.
  3. Select Settings from the dropdown menu.
  4. Select Access tokens from the sidebar menu.
  5. Click Generate new token.
  6. Enter a description, for example Torii. Keep the default user:all scope.
  7. Select how long the access token should remain valid.
  8. Click Generate token and copy the token.

Important
Sourcegraph shows the access token only once. Copy it before you close the page. When the token expires, create a new one and reconnect the integration.

How to Connect the Integration

  1. Go to the Integrations page in Torii.
  2. Search for Sourcegraph and click Connect.
  3. Enter your Instance URL.
  4. Paste the token into the Access Token field.
  5. Click Connect.

Actions

  • Create user creates a new Sourcegraph user with the username you enter and the user's email.
  • Change Sourcegraph user role makes a user a site admin, or removes site admin.
  • Delete user deletes a Sourcegraph user. Sourcegraph keeps the deleted account's record (soft delete).

These actions require a site admin access token.

Q&A

Q: Why do some users show as "Locked"?

A: Sourcegraph locks an account for a short time after too many failed sign-in attempts. The lock ends on its own, so Torii keeps these users active.



For any further questions, please contact Torii Support.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request