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

# Opsgenie

## After this article

You'll be able to connect Opsgenie to Lumos, sync users and their entitlements, validate on-call membership for pre-approval rules, and resolve common connection issues.

## Capabilities

| Functionality | Type | Sync | Provision | Description |
| - | - | - | - | - |
| Users | Account | Yes | No | User accounts, with status mapping (see below) |
| Team | Entitlement | Yes | No | The Opsgenie team(s) the employee is assigned to |
| Role | Entitlement | Yes | No | The Opsgenie role mapped to the employee (from the `role.name` field) |

**User status mapping:**

| Opsgenie User Status | Lumos Account Status |
| - | - |
| verified | Active |
| blocked | Suspended |
| anything else | Staged |
| deleted (Opsgenie no longer returns a user) | Deprovisioned |

**Validate on-call membership**

As a condition of a pre-approval rule, Lumos can check whether a user is currently assigned to an Opsgenie on-call schedule to decide if they should be pre-approved for access to an app. When verifying whether a requester is part of an on-call schedule, Lumos does a real-time check to make sure the person receiving access is still on-call.

## Required plan and roles

* **Opsgenie plan:** no minimum Opsgenie plan is required to connect this integration.
* **Opsgenie role:** your Opsgenie user must be an **Admin** to create the API key and authorize the connection.
* **API key access rights:** the API key you generate needs **Read** (can read alerts, incidents, and configurations) and **Configuration Access** (can access Opsgenie configurations). Both are required.

## Read-only access vs provisioning

**Is read-only possible?** Yes, and it's the only mode. Opsgenie syncs users, teams, and roles for visibility and on-call validation only.

**What read-only requires.** An API key created by an Opsgenie Admin with both **Read** and **Configuration Access** rights, plus your Opsgenie tenant name, entered as described below.

**Watch out for.** Both access rights are required together. Without Configuration Access, Lumos can't read Opsgenie configurations even if Read is granted, and the connection fails during setup.

## Instructions

**Phase 1: Create an API key in Opsgenie**

1. Log into Opsgenie from `https://{your-tenant-name}.app.opsgenie.com/`.
2. Go to **Settings**.
3. Click **API key management** from the right panel.
4. Create an API key with these access rights: **Read** and **Configuration Access**.

**Phase 2: Connect in Lumos**

1. Find the Opsgenie card in your Lumos integrations (reconnect an existing card or add a new one).
2. Enter your Opsgenie tenant name in the **Customer Name** field.
3. Enter the API key you generated in Opsgenie in the **API Key** field.
4. Click **Connect Opsgenie**.

## API Endpoints Used

<Note>
  The API endpoints this integration uses are available to logged-in Lumos customers. [Log in](/login) to view them.
</Note>

## Troubleshooting

**Connection fails during setup.** Confirm the Opsgenie user who created the API key is an Admin, and that the key was granted both **Read** and **Configuration Access** rights. Without both, Lumos can't read users and configurations.

**A user disappeared from the sync.** Opsgenie stops returning deleted users, so Lumos marks the account **Deprovisioned**. Check the user's status in the Opsgenie admin console.

**A blocked user shows as Suspended.** That's expected. Opsgenie returns the `blocked` status, which Lumos maps to **Suspended**.
