> ## 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.

# New Relic User Provisioning & Deprovisioning

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

![](https://mintcdn.com/klef/qX46oBV6DeGKOZhx/images/connectors/new-relic.svg?fit=max\&auto=format\&n=qX46oBV6DeGKOZhx\&q=85\&s=4dad4620e5a9da7c4a4dbb403b5041ac)

# New Relic

## Connection

### Setup

**Step 1**

Sign in to New Relic as a core or full platform user who holds the **Authentication Domain Manager** role, and create a [user key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#user-key).

**Step 2**

From the user menu, go to **Administration** > **Authentication domains**, open a domain that adds users manually, and copy the ID at the top of its page.

**Step 3**

Choose your [data center](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/#endpoints), enter the domain ID and the user key in the connection's settings, and click the **Save** button.

### Settings

| Setting | Required | Description |
| - | - | - |
| Data center | Yes | The data center your organization's data is stored in. |
| Authentication domain ID | Yes | The ID of the authentication domain the connector adds users to, which must provision users manually. |
| User key | Yes | A user key of a user who holds the Authentication Domain Manager role. |

## new\_relic.user

### Fields

| Field | Type | Required | Description |
| - | - | - | - |
| `email` | string | Yes | Email address the user signs in with. The connector does not change it once the user exists. Never changed once the account exists. |
| `name` | string | Yes | Full name. |
| `userType` | enum | | User type, which sets the user's billing tier. Defaults to Basic. Values: `BASIC_USER_TIER` (Basic), `CORE_USER_TIER` (Core), `FULL_USER_TIER` (Full platform). |
| `groups` | entitlements | | Groups the user belongs to, which grant their roles on accounts. One row grants one group. |
| `groups[]` | string | | Group ID. |
| `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 New Relic, 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

### New Relic users

A basic New Relic user for every engineer, deleted when they leave.

```hcl theme={null}
stage active {
  target new_relic.user {
    email  = worker.business_email
    name   = worker.display_name
    status = enabled
  }
}
```


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