# Time-bound and elevated access

> Access that ends on a date, temporary elevation with approval, delegation and break-glass.

Source: https://docs.ligament.ai/guides/access/time-bound-access/

Some access should only last a while: cover for a colleague on leave, a contractor until the end of the project, extra rights for one evening shift, or a way in during an outage. Ligament has four tools for this, and each one ends on its own: nobody has to remember to take the access away.

| You want | Use | Who starts it | Longest |
| --- | --- | --- | --- |
| Give someone a role until a date | [An assignment with an end date](#assignments-with-an-end-date) | An owner or admin | 366 days |
| Let a member ask for a role for a few hours | [An elevation](#elevations) | The member asks, an owner or admin approves | The role’s max hours (at most 90 days) |
| Let someone act for a manager | [A delegation](#delegations) | The manager, or an admin | 30 days (manager), 90 days (admin) |
| Get in during an emergency, at once | [Break-glass](#break-glass) | An eligible person, no approval | 4 hours |

All four appear in **Settings › Access › Assignments** while they’re active, and every start, decision and end is written to **Settings › Access › Audit**. When one ends, the access ends with it on the next request; nothing has to run first.

\[Screenshot: Settings › Access › Assignments: Mia Member holds Service desk lead until the end of December and Team lead through a delegation; Vic Viewer holds Team lead with no expiry\]

## Assignments with an end date

1.  Open the role (Settings › Access › Roles) and click **Assign role**, or click **Assign role** on the Assignments tab.
2.  Pick the member and the role. If the role has parameters, fill them in.
3.  Under **Expires**, pick 1 day, 1 week, 30 days, **On a date**, or No expiry.
4.  Add a reason. It’s kept in the access audit.
5.  Click **Assign**.

In Northwind Group, Mia Member covers as service desk shift lead for December:

```bash
curl -X POST "https://app.ligament.ai/api/access/assignments" \
  -H "authorization: Bearer $LIGAMENT_API_KEY" -H "content-type: application/json" \
  -d '{"userId":"<Mia user id>","roleKey":"service_desk_lead","expiresAt":"2026-12-31T17:00:00.000Z","reason":"Acting shift lead for December"}'
```

```json
{
  "id": "cmx6asm0d00k16x6swo7a0zzo",
  "userId": "ixO3gz5g8e3XQY4PvpXkT6dQD32DlB5P",
  "roleKey": "service_desk_lead",
  "source": "direct",
  "startsAt": "2026-12-02T15:45:55.308Z",
  "expiresAt": "2026-12-31T17:00:00.000Z",
  "reason": "Acting shift lead for December",
  "grantedBy": "vtvYBRvkNm4bYx6I0D9xqXS1lxzj7rBJ"
}
```

The key needs the `members:write` scope. You can also pass `startsAt` to start later. To end an assignment early, click **Unassign** on the Assignments tab (or `DELETE /api/access/assignments/<id>`).

Group mappings have no end date. For access that ends, assign the role to the people.

## Elevations

An elevation is a request for a role for a few hours, with a reason, that an owner or admin approves.

First make the role elevatable: in the role’s editor, switch on **Elevatable** and set **Max hours**. Without max hours an elevation lasts at most 8 hours.

Members ask through the API with their own session; the app has no screen for members to make the request yet. Mia asks for Service desk lead for an evening:

```text
POST /api/access/elevations
{"roleKey":"service_desk_lead","hours":4,"reason":"Covering the evening shift lead while Lena is on leave"}
```

```json
{ "id": "cmx6apm5k00e36x6s37enp1gt", "roleKey": "service_desk_lead", "kind": "request", "hours": 4, "status": "pending" }
```

The reason must say something (at least 10 characters). Owners and admins get a notification, and the request waits in **Settings › Access › Elevations**:

\[Screenshot: Settings › Access › Elevations: Mia Member asks for Service desk lead for 4 hours, with Approve and Deny buttons\]

An owner or admin clicks **Approve** or **Deny**, and can add a note. You can’t decide your own request. On approval the role starts at once and runs for the hours asked for:

```json
{ "status": "active", "decidedBy": "vtvYBRvkNm4bYx6I0D9xqXS1lxzj7rBJ", "decisionNote": "Approved for tonight",
  "startsAt": "2026-12-02T15:44:23.579Z", "endsAt": "2026-12-02T19:44:23.579Z" }
```

While it’s active, Mia’s explanation for deleting an incident names the elevation and when it ends:

```text
also holds "service_desk_lead" (elevation, until 2026-12-02T19:44:23.579Z)
set service_desk.lead (role "service_desk_lead", elevation): allow delete
```

To end it early, click **Revoke** under Active now, with a reason. Through the API: `POST /api/access/elevations/<id>/decide` with `{"approve": true, "note": "…"}` (or `false`), and `POST /api/access/elevations/<id>/revoke` with `{"reason": "…"}`.

## Delegations

A delegation lets one person act for a manager on a hierarchy, for example while the manager is on holiday. While it’s active, the delegate:

-   sees and acts on the manager’s reporting line as if it were theirs;
-   holds the manager’s custom roles whose sets use the hierarchy (such as Team lead), until the delegation ends.

It only affects grants that walk the hierarchy. Restrictions still apply to the delegate.

Who can create one:

-   the manager, for their own line, for at most 30 days, through the API;
-   owners, admins and holders of the `access.delegate` capability, for anyone’s line, for at most 90 days, with **New delegation** in **Settings › Access › Delegations**.

Longer than that needs an [elevation](#elevations) instead.

Vic Viewer, Northwind’s Facilities team lead, hands the team to Mia for two weeks:

```text
POST /api/access/delegations
{"hierarchy":"hr.reporting","toUserId":"<Mia user id>","endsAt":"2026-12-16T17:00:00.000Z","reason":"Covering my team while I am on annual leave"}
```

```json
{
  "hierarchy": "hr.reporting",
  "fromUserId": "pouyJIsvwzDk87bfOKevCX01vT2rjjMR",
  "fromNodes": ["cmx6ak5xy009x6x6srp7pyvma"],
  "toUserId": "ixO3gz5g8e3XQY4PvpXkT6dQD32DlB5P",
  "endsAt": "2026-12-16T17:00:00.000Z",
  "createdAs": "self",
  "roles": ["team_lead"]
}
```

\[Screenshot: Settings › Access › Delegations: Vic Viewer to Mia Member on the reporting line, active until 16 December\]

Click **Revoke** to end a delegation early. An admin creating one for someone else adds `"fromUserId"`.

## Break-glass

Break-glass is for emergencies: an eligible person turns on a role themselves, at once, with a reason, for up to 4 hours. Nobody approves it, but every owner gets an in-app notification and an email, and every record change made under it is audited with the session.

Set it up in the role’s editor (owners only):

1.  Switch on **Break-glass** and set **Max hours** (at most 4).
2.  Under **May break the glass**, add the members or groups who may use it. Owners and admins always may.
3.  Plan and apply.

Northwind Group’s role Emergency access holds a set with full access to incidents and problems, and Alex Agent may break the glass. During a P1, Alex activates it:

```text
POST /api/access/break-glass
{"roleKey":"emergency_access","reason":"P1: payroll service down, need to merge duplicate incidents","hours":1}
```

```json
{
  "elevation": { "kind": "breakglass", "hours": 1, "status": "active",
                 "startsAt": "2026-12-02T15:44:53.565Z", "endsAt": "2026-12-02T16:44:53.565Z" },
  "notified": { "inApp": 1, "email": 1 }
}
```

Someone who isn’t eligible gets `403 not_eligible`: “You aren’t eligible to break the glass for “emergency\_access”: ask an owner to add you”.

\[Screenshot: Settings › Access › Break-glass: the Emergency access role, Alex Agent's active session ending in 60 minutes, and the Activate form\]

Owners and admins can also activate from the form on the **Break-glass** tab. Members who are eligible use the API with their session, because Settings › Access is only open to admins. To end a session early, click **End now**.

Break-glass roles can’t be assigned or mapped to groups: the only way in is activation with a reason.
