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

# Segment

> Connect Segment to Oleria to bring workspace members, roles, and user groups from your customer data platform into your identity and access graph.

Connect Segment to Oleria to see who has access to your Segment workspace: its members, their workspace-level roles, and user groups. Oleria reads identity and access data from the Segment Public API using an API token, so you can see where access is over-provisioned and take action directly from Oleria.

## What Oleria discovers

Once connected, Oleria continuously discovers and maps the following from your Segment workspace:

* **Accounts** - every member of the workspace, with their name and email address. Members who hold the Workspace Owner role are marked as administrators.
* **Roles** - Segment's role catalog, including roles that no one currently holds.
* **User groups** - every user group and its members.
* **Role assignments** - which accounts and user groups hold which workspace-level roles.

<Note>
  Segment can scope a role to a single resource, such as one source, instead of the whole workspace. Oleria maps workspace-level role assignments only.
</Note>

## Prerequisites

* A Segment workspace on a Team or Business plan. Segment offers its Public API, which Oleria uses, only on those plans.
* A Segment account with the Workspace Owner role. Only Workspace Owners can create Public API tokens.
* A workspace in Segment's US region. Workspaces in the EU region aren't supported.
* Admin access to the Oleria workspace

## Create an API token in Segment

<Steps>
  <Step title="Open Access Management">
    Sign in to Segment as a Workspace Owner, then select **Settings** -> **Workspace settings** -> **Access Management** -> **Tokens**.
  </Step>

  <Step title="Create a token">
    Select **+ Create Token** and enter a description, for example `Oleria Integration`.
  </Step>

  <Step title="Assign Workspace Owner access">
    Assign the token **Workspace Owner** access, then select **Create**.

    <Note>
      **Workspace Owner** access gives the token full read and edit access to everything in your Segment workspace, which covers everything Oleria reads. Create a token just for Oleria and store it securely.
    </Note>
  </Step>

  <Step title="Copy the token">
    Copy the token somewhere secure, then select **Done**.

    <Warning>
      If you lose the token, create a new one and update the integration in Oleria.
    </Warning>
  </Step>
</Steps>

## Connect Segment to Oleria

<Steps>
  <Step title="Open the integration">
    Go to your Oleria workspace, select **Integrations** -> select **Segment**.
  </Step>

  <Step title="Complete the connection form">
    Select **Continue** and provide the following:

    | Field | Notes |
    | :- | :- |
    | API Token | Required. Paste the token you created in the previous section. |
  </Step>

  <Step title="Confirm the connection">
    Select **Authenticate** to validate the token. Oleria checks that the token can read your workspace, users, roles, and user groups, and rejects it if it can't read all four. Find the newly connected Segment workspace on the **Connected** tab of your Oleria **Integrations** page.
  </Step>
</Steps>

## Verify the integration

Confirm the Segment workspace appears on the **Connected** tab of your Oleria **Integrations** page. After the first sync completes, you can review the discovered accounts, roles, and user groups in your Oleria workspace.

<Note>
  If you revoke or replace the token in Segment, update it in Oleria by editing the integration. A revoked token causes the sync to fail.
</Note>

## Contact us

For questions about this integration, contact us at [support@oleria.com](mailto:support@oleria.com).


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