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

# Fivetran

> Learn how to connect Opal to Fivetran to review who holds account, destination, and team roles.

With the Fivetran integration, you can review access to your Fivetran account from Opal:

* See each account user's account role, including custom roles
* See who can reach each destination, and with which destination role
* See Fivetran teams, their members, and the account and destination roles each team holds
* Include Fivetran access in access reviews

Opal connects to one Fivetran account through an API key and secret. To review several accounts, add a Fivetran app in Opal for each one.

## Supported resources

| Resource | Read | Grant and revoke access | Notes |
| - | - | - | - |
| Fivetran Organization | ✔️ | | Account roles, including custom ones, held by users and by teams |
| Fivetran Destinations | ✔️ | | Destination roles, including custom ones, held by users and by teams |
| Fivetran Teams | ✔️ | | Team members with their team role, and the destinations each team reaches |

Opal syncs active account users, including invited users who haven't accepted yet. It skips suspended users and users without an email address. Opal doesn't sync Fivetran connections or the roles held on them.

### How Fivetran access maps to Opal

* **Organization**: your Fivetran account appears as **Fivetran Organization**, with each account-scoped role as an access level. A user with **No Account Role** holds nothing on the organization directly, and reaches it only through a team that holds an account role.
* **Destinations**: each destination appears as a **Fivetran Destination**, with each destination-scoped role as an access level. A member Fivetran lists on a destination without a destination role isn't shown there; their access comes from their account role, which the organization shows.
* **Teams**: each team appears as a **Fivetran Team**. Members hold their role within the team, and the team holds its account role on the organization and its role on each destination it reaches.

## Requirements

Before you begin, you must:

* Be an Opal Admin
* Have a Fivetran Account Administrator who can create an API key, or an existing system key with **READ** on **USER**, **ROLES**, **TEAM**, and **DESTINATION** for the whole account
* Be on version `X` or later, if you self-host Opal

## Configuration steps

### 1. Get a Fivetran API key and secret

Any kind of Fivetran API key works. Each is a key and secret pair:

* **Scoped API key**: belongs to one person and inherits their role, so it must belong to an Account Administrator. Fivetran deletes it when that user is removed.
* **Service account API key**: inherits its service user's role the same way, and keeps working when people leave. Give the service user the Account Administrator role.
* **System key**: if you already have one, it needs **READ** on **USER**, **ROLES**, **TEAM**, and **DESTINATION**, for the whole account.

Copy the API key and the API secret. Fivetran shows the secret only once, when the key is generated. See Fivetran's [REST API documentation](https://fivetran.com/docs/developer-resources/rest-api).

> [!WARNING]
>
> The key must see every destination in the account. A key limited to some destinations gets a filtered list instead of an error, so Opal would show access to the other destinations as removed.

> [!NOTE]
>
> Every sync counts toward your Fivetran account's hourly API limit: 500 requests on a trial account and 20,000 on a paid one, shared with any other automation that uses the API.

### 2. Create the Fivetran app in Opal

In Opal, go to **Inventory** > **+ App** and select **Fivetran**. Fill in the following fields:

| Field | Value |
| - | - |
| App name | A name for the Fivetran app in Opal, for example `Fivetran`. |
| App admin | The owner who administers the app in Opal. |
| Description | A short description that helps requesters understand what this app is. |
| API key | The API key from step 1. |
| API secret | The API secret from step 1. |

The API key is shown on the app so you can match it to the key in Fivetran. It can't be changed after you create the app. To use a different key, create a new Fivetran app.

Opal checks the credentials when you save the app.

### 3. Import assets

After you save the app, import the items you want to review: on the app's **Assets** tab, select **Import assets**, and choose the organization, destinations, and teams. Opal pulls access only for imported items, so members appear after the next sync.

## Troubleshooting

| Error or symptom | Fix |
| - | - |
| Saving the app fails | Use the API key and secret from the same key, and a key that can read users. |
| A **Read** check fails on the **Setup** tab | Use an Account Administrator's key, or give the system key **READ** on the matching type: **USER**, **ROLES**, **DESTINATION**, or **TEAM**. |
| A sync fails on the API rate limit | The hourly limit is shared with your other automation. Wait for it to reset, then sync again. |


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