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

# Lumos Expression Language Context Reference

> Every object you can reference in a Lumos Expression Language (LEL) expression or condition, such as user, access_request, and account, with its attributes and where each one is available.

When Lumos evaluates a Lumos Expression Language (LEL) expression, it provides a set of named objects, called the **context**. `user` is one context object. `access_request` is another. Which objects are present depends on where the expression runs. A provisioning workflow for an AppStore request has the request, but an onboarding workflow doesn't.

This page lists every context object, its attributes, and where you can use it. For syntax, operators, and functions, see [Using the Lumos Expression Language in Workflows](https://docs.lumos.com/for-admins/access-policies-lifecycle-management/using-the-lumos-expression-language-in-workflows.md).

## Context objects at a glance

| **Object** | **What it holds** | **Where you can use it** |
| - | - | - |
| [`user`](#user) (also `identity`) | The identity the workflow or rule is about | Workflow step inputs, notification templates, email and attribute generation, identity matching rules (identity side), and all identity conditions |
| [`access_request`](#access_request) | The AppStore request that started the workflow | AppStore provisioning and deprovisioning workflows, and pre-approval rules |
| [`account`](#account) | An app account Lumos discovered | Identity matching rules (account side) |
| [`DO_NOT_SET`](#special-values) and [`SET_TO_NULL`](#special-values) | Special values that control whether an attribute is written | Workflow step inputs |
| [Condition-only attributes](#condition-only-attributes) | Values that exist only in a condition builder, such as `webhook.responses` or `app.category` | Condition builders. Which attributes a builder offers depends on the kind of condition. |

If you reference an object that isn't available where the expression runs, the expression fails. In a workflow, that creates an Error Task.

***

## `user`

`user` is the identity a workflow runs for, or the identity a condition is being checked against. `identity` is an alias for the same object, so `user.email` and `identity.email` return the same value. The workflow builder suggests `user.`. Identity matching rules accept only `user.`.

### Standard attributes

| **Attribute** | **Type** | **Description** |
| - | - | - |
| `user.email` | string | Email address |
| `user.stable_identifier` | string | The identity's stable identifier from its source of truth |
| `user.given_name` | string | First name |
| `user.family_name` | string | Last name |
| `user.full_name` | string | Full display name |
| `user.title` | string | Job title |
| `user.team` | string | Team or department |
| `user.status` | string | Lifecycle status: `STAGED`, `ACTIVE`, `SUSPENDED`, or `INACTIVE` |
| `user.identity_type` | string | Employment type: `FULL_TIME`, `PART_TIME`, `INTERN`, `CONTRACTOR`, `FREELANCE`, `SERVICE_ACCOUNT`, `OTHER_HUMAN`, or `OTHER_NON_HUMAN` |
| `user.start_date` | datetime | Employment start date |
| `user.end_date` | datetime | Employment end date |
| `user.email_is_lumos_generated` | boolean | `true` when Lumos generated the email address, for example with a Generate Email Address step |
| `user.manager` | `user` | The user's manager, with the same standard attributes as `user`, for example `user.manager.email` or `user.manager.given_name` |
| `user.source_app` | app summary: `id`, `user_friendly_label` | The app this identity was imported from, for example `user.source_app.user_friendly_label`. See the availability note below. |
| `user.custom_attributes` | map of attribute name to value | Your organization's custom attributes. See [Custom attributes](#custom-attributes). |
| `user.groups` | list of groups: `name`, `external_id`, `description` | Groups the user belongs to. See [Groups](#groups). |

Any attribute can be empty. Use `or` to supply a fallback, for example `user.title or "Employee"`.

### Custom attributes

Read a custom attribute by the name shown in your Lumos settings:

```
user.custom_attributes["preferred_name"]
user.custom_attributes["Employee ID"]
```

To use an attribute from a connected system such as Okta or Workday, first store it as a custom attribute on the identity.

### Groups

`user.groups` is a list of the groups the user belongs to. Each group has `name`, `external_id`, and `description`.

```
user.groups[0].name
len(user.groups)
```

> [!NOTE]
>
> Lumos loads groups only when it evaluates a **condition**. It loads `source_app` only in access policy and workflow conditions, not in branch steps, pre-approval rules, or escalation policy exclusions. In workflow step inputs and notification templates, `user.groups` is an empty list and `user.source_app` is empty.

***

## `access_request`

`access_request` holds the AppStore request that started the workflow. Use it to pass what the requester entered into a provisioning step. For example, a step can read a GitHub username from an intake field instead of asking someone to look it up.

| **Attribute** | **Type** | **Description** |
| - | - | - |
| `access_request.intake_responses` | map of reference key to string | The requester's answers to the app's [custom intake fields](https://docs.lumos.com/for-admins/appstore/configuring-custom-intake-fields.md), keyed by each field's reference key. An unanswered field is empty. |
| `access_request.access_length` | number | How long access was requested for, in seconds. A request with no end date has the value `2147483647`. |

Read an intake answer by its reference key:

```
access_request.intake_responses["github_username"]
```

Use brackets for every key. Dot notation reads the wrong value when a reference key matches a built-in name such as `items` or `get`.

### Where `access_request` is available

* **AppStore account provisioning workflows** and **permission provisioning workflows**, in step inputs. The answers are the same whether the request came from the Employee AppStore, Slack, or an AI assistant over MCP.
* **AppStore account deprovisioning workflows** and **permission deprovisioning workflows**, in step inputs. Here `access_request` is the removal request, not the request that originally granted the access.
* **Pre-approval rules**, through the condition builder. See [Condition-only attributes](#condition-only-attributes).

`access_request` isn't available in onboarding, offboarding, mover, or attribute sync workflows, or in Wait Until steps.

***

## `account`

`account` is an app account that Lumos discovered and needs to match to an identity. It is available only on the account side of [identity matching rules](https://docs.lumos.com/for-admins/applications-entitlements/configuring-account-to-identity-matching-rules.md). In workflows, a step that targets an account uses the linked identity's `user` attributes instead.

| **Attribute** | **Type** | **Description** |
| - | - | - |
| `account.email` | string | Email address on the account |
| `account.username` | string | Username on the account |
| `account.given_name` | string | First name |
| `account.family_name` | string | Last name |
| `account.full_name` | string | Full display name |
| `account.integration_specific_user_id` | string | The account's ID in the app |
| `account.raw_identity_type` | string | The account type exactly as the app reports it |
| `account.normalized_identity_type` | string | The account type mapped to a Lumos identity type, such as `FULL_TIME` or `SERVICE_ACCOUNT` |
| `account.custom_attributes` | map of attribute name to value | Other attributes the app reports for the account, for example `account.custom_attributes["department"]` |

For example, to match accounts that still use an old email domain:

```
Account Expression: account.email.replace('@oldcompany.com', '@newcompany.com')
Identity Field: user.email
```

***

## Special values

These names are always defined in workflow step inputs. They aren't attributes. An expression returns them to tell Lumos what to do with the field.

| **Value** | **Effect** |
| - | - |
| `DO_NOT_SET` | Lumos skips the field and leaves its current value in the app unchanged. |
| `SET_TO_NULL` | Lumos clears the field in the app. Available for select apps only. |

```
user.title if user.title else DO_NOT_SET
```

***

## Condition-only attributes

The attributes below exist only in condition builders. You pick them from a menu, so you don't type them. You also see them as paths in conditions read or written through the Lumos API.

### Identity conditions

These apply to access policies, workflow conditions, branch steps, flexible approvals, escalation policy exclusions, and pre-approval rules.

| **Attribute path** | **Description** |
| - | - |
| `identity.<attribute>` | Any [standard attribute](#standard-attributes) or [custom attribute](#custom-attributes) |
| `identity.manager.uuid` | The manager's Lumos ID |
| `identity.groups[*].external_id` | Group membership, using each group's ID in its app |
| `identity.source_app.id` | The ID of the app the identity was imported from. Access policies and workflow conditions only. |
| `identity.oncall["<schedule ID>"].on_call` | Whether the user is on call for an on-call schedule right now. Pre-approval rules only. |

### Pre-approval rules

| **Attribute path** | **Description** |
| - | - |
| `access_request.access_length` | Requested access length in seconds, as in [`access_request`](#access_request) |
| `access_request.permissions` | The entitlements on the request. Lumos checks each requested entitlement on its own, so different rules can cover different entitlements in one request. |
| `webhook.responses["<webhook ID>"]` | The response option a pre-approval webhook returned, such as `PREAPPROVED`. A webhook that fails or times out matches nothing. |

### Role bulk assignment

| **Attribute path** | **Description** |
| - | - |
| `app.name` | App name |
| `app.category` | App category |
| `app.status` | App status: `DISCOVERED`, `IN_REVIEW`, `NEEDS_REVIEW`, `APPROVED`, `BLOCKLISTED`, or `DEPRECATED` |

***

## FAQs

**Can I use `identity` instead of `user`?**

Yes, in workflow step inputs and conditions. Both names refer to the same identity. Identity matching rules accept only `user.`.

**Why is `user.groups` empty in my workflow step?**

Lumos loads group membership only when it evaluates a condition. To act on group membership in a workflow, add a branch step with a group condition.

**Why can't I reference `access_request` in my onboarding workflow?**

Onboarding workflows start from a new hire, not from an AppStore request, so there's no request to read. `access_request` is available only in workflows an AppStore request starts.

**What happens if an intake field wasn't answered?**

`access_request.intake_responses["<key>"]` is empty. Use `or` to supply a fallback, for example `access_request.intake_responses["region"] or "us"`.

***

## Other Questions?

Contact [support@lumos.com](mailto:support@lumos.com) or your CSM.
