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

# Sentry User Provisioning & Deprovisioning

> Automate Sentry user provisioning and deprovisioning from your HRIS. Klef creates, updates, and deactivates accounts when HR makes a change.

![](https://mintcdn.com/klef/mWDrLJHo8WiA9bu1/images/connectors/sentry.svg?fit=max\&auto=format\&n=mWDrLJHo8WiA9bu1\&q=85\&s=22da89910309e348fcce74fabef181d3)

# Sentry

## Connection

### Setup

**Step 1**

Sign in to Sentry as an owner or manager of the organization, open the **Account** menu in the top left, and choose [Personal Tokens](https://docs.sentry.io/account/auth-tokens/#personal-tokens).

**Step 2**

Create a token with the **Organization: Read**, **Member: Admin**, and **Team: Admin** scopes.

**Step 3**

Enter your organization's [data storage location](https://docs.sentry.io/organization/data-storage-location/), its slug, and the token in the connection's settings, and click the **Save** button.

### Settings

| Setting | Required | Description |
| - | - | - |
| Data storage location | Yes | Where your organization's data is stored, which Sentry shows under Organization Settings. |
| Organization slug | Yes | The slug in your organization's address, such as acme in acme.sentry.io. |
| Personal token | Yes | A personal token of an owner or manager, which Sentry requires to change organization roles. |

## sentry.user

### Fields

| Field | Type | Required | Description |
| - | - | - | - |
| `email` | string | Yes | Email address Sentry invites the member at. The connector does not change it once the member exists. Never changed once the account exists. |
| `orgRole` | enum | | Organization role. Defaults to Member. A token's owner assigns only roles up to their own. Values: `member` (Member), `admin` (Admin), `manager` (Manager), `owner` (Owner), `billing` (Billing). |
| `teams` | entitlements | | Teams the member belongs to. A team written on its own makes the member a contributor. One row grants one team. |
| `teams[].team` | string | Yes | Team ID. |
| `teams[].role` | enum | | Role on the team. Sentry offers team roles on its Business and Enterprise plans. Values: `contributor` (Contributor), `admin` (Team Admin). |
| `status` | enum | | Whether the person can sign in, the account is kept switched off, or the account is gone. Values: `enabled` (Enabled), `removed` (Removed). |

### Default Account Matching Rules

When Klef [adopts](https://klef.ai/docs/adoption.md) an account that already exists in Sentry, it works out whose it is by trying these in order. A connection can override them.

| Account field | Worker field |
| - | - |
| `email` | `worker.business_email` |

## Examples

### Sentry members

A Sentry member for every engineer, removed when they leave.

```hcl theme={null}
stage active {
  target sentry.user {
    email   = worker.business_email
    orgRole = "member"
    status  = enabled
  }
}
```


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