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

# access_grants

> Limits user access to a particular field (dimension or measure) through user attributes.

Each grant targets a [user attribute](/administration/users/attributes). Users will be granted access if their corresponding user attribute has any of the values specified in the grant.

Access grants are only applied to direct access and queries, meaning they don't impact references within the model. For example, if a user can't see field `a` but can see field `b`, and `b` references `a`, the user can still access and query using field `b`.

Once defined, access grants can be set for topics and fields with the `required_access_grants` parameter.

## Syntax

```yaml theme={null}
access_grants:
  access_grant_name:
    user_attribute: "<user_attribute_reference>"
    allowed_values: ["<value_one>", "<value_two>", ...]
    access_boostable: true/false
```

## Properties

<ParamField path="access_grant_name" type="string" required>
  A name that uniquely identifies the grant.

  <Expandable title="access_grant_name properties" defaultOpen="true">
    <ParamField path="user_attribute" type="string" required>
      The reference of the user attribute that the grant targets.
    </ParamField>

    <ParamField path="allowed_values" type="string[]" required>
      A list of values the user attribute must have to be granted access.
    </ParamField>

    <ParamField path="access_boostable" type="boolean" default="false">
      If `true`, users with AccessBoost for a given document will bypass the access grant check for that specific document. Defaults to `false`.
    </ParamField>
  </Expandable>
</ParamField>

## Examples

```yaml title="Grant access for California and Pennsylvania regions" theme={null}
access_grants:
  region_access:
    user_attribute: "region"
    allowed_values: ["California", "Pennsylvania"]
    access_boostable: false
```

```yaml title="Grant access for user group" theme={null}
access_grants:
  blob_sales_access:
    user_attribute: "omni_user_groups"
    allowed_values: ["Blob Sales"]
    access_boostable: false
```
