> For the complete documentation index, see [llms.txt](https://docs.balkan.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integrations/lattice-integration-setup.md).

# Lattice Integration Setup

### Getting Started

Use this guide to connect Lattice to your BalkanID tenant. You will need an API key from Lattice and access to the Integrations section in BalkanID.

{% hint style="info" %}
A Lattice API key inherits the permissions of the user who generated it. If that user is later deactivated in Lattice, requests made with the key are rejected and the integration stops syncing. Generate the key from an account that will remain active.
{% endhint %}

#### Requirements:

Before you begin, collect the following values from Lattice:

* **API Key**
* **Data Residency (us or emea)**

### Configure Lattice within your BalkanID tenant

1. Sign in to Lattice as an administrator. Generating an API key requires the **Manage integrations, SSO, and API data** permission.
2. Navigate to **Admin > Platform > API keys**.
3. Click **Generate API key**, then click **Copy**. Lattice displays the full key only once, so store it before you leave the page.
4. Note the data residency region of your Lattice account. Lattice serves its API from a different address for each region, so you will enter either `us` or `emea` in BalkanID to match.
5. In BalkanID, go to the Integrations page and click **Add integration**.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FDQy6nO1deOeD5XZVpXKi%2Flattice-add-integration.png?alt=media" alt="The BalkanID Integrations page, with the Add integration button in the top right of the toolbar"><figcaption><p>Add integration</p></figcaption></figure></div>

6. Search for Lattice, select it, then click **Next**.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FZq5eBfD1smoY7xFAQCLT%2Flattice-connect-application.png?alt=media" alt="Step one of the Connect a new application wizard, with Lattice found by search and selected"><figcaption><p>Connect a new application</p></figcaption></figure></div>

7. Under **Direct Configuration**, paste your API key into **API Key** and enter your region into **Data Residency (us or emea)**, then click **Next.**

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FQSOnNYqkIjPhf4reYNJq%2Flattice-direct-configuration.png?alt=media" alt="The Direct Configuration section of the wizard, showing the masked API Key field and the Data Residency field set to us"><figcaption><p>Direct Configuration</p></figcaption></figure></div>

8. Fill **Optional Configuration**, if required.

<div data-with-frame="true"><figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FZbipc8nl8LTFl5YsVIaj%2Foptional-configuration.png?alt=media" alt="The Optional Configuration step, showing Reviewer Settings and the fulfillment options"><figcaption><p>Optional Configuration</p></figcaption></figure></div>

9. Once you have filled in the information, click **Save**. Your integration is now configured and you will see the status of the integration displayed alongside other integrations on the Integrations page. When data is available, the integration Status column will read **Connected** and the integration Message will read **Data available**.

### What BalkanID extracts from Lattice

BalkanID reads your Lattice user directory and records which users hold administrator access.

| Extracted | Details                                                                                                    |
| --------- | ---------------------------------------------------------------------------------------------------------- |
| **Users** | Every Lattice user, including deactivated accounts, with their email, job title, department and status     |
| **Admin** | Users who hold administrator access in Lattice, shown as an Admin entitlement they can be reviewed against |

Lattice's public API does not expose its custom roles, system roles or granular administrator types, so those are not available to BalkanID. Departments are recorded as an attribute of each user rather than as a separate group.

### Integration Scopes

| Read Only Scopes                                                                                                     | Lifecycle Management Scopes |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------- |
| **Manage integrations, SSO, and API data (Read)** — lets the API key read the Lattice user directory and departments | N/A                         |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integrations/lattice-integration-setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
