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

# modelRoles

> Defines the level of access users will have for individual models in a connection.

Defines the level of access users will have for individual models in a connection.

In the **Embed URL Builder**, this is the **Model roles** field.

## Syntax

```markdown theme={null}
modelRoles={"<model_id>":"<model_role>", ...}
```

## Properties

**modelRoles** `object`

An object containing model ID and role pairs, formatted as `"<model_id>: <model_role>"`. `model_role` values must the name of a standard user role **or** the name of a [custom user role](https://docs.omni.co/administration/users/custom-roles.md) that resolves to either a **Viewer** or **Restricted Querier**.

* `RESTRICTED_QUERIER` - Can create new content and view workbooks and dashboards based on the specified model
* `VIEWER` - Can only view dashboards based on the specified model
* `<CUSTOM_ROLE_NAME>` - Abilities depend on the role's included permissions

> [!NOTE]
>
> Model roles must be equal to or more permissive than the associated [connection's base access role](https://docs.omni.co/embed/setup/url-parameters/connectionRoles.md). For example, if the connection has a base access role of `RESTRICTED_QUERIER`, it will override a model with a `VIEWER` role.

## Behavior

Each embed sign-in removes the user's role on models that aren't in `modelRoles`. To keep a role, include the model on every request. See [How sessions update embed users](https://docs.omni.co/embed/setup/url-parameters.md#user-updates) for more information.

## Examples

> [tab] v1 payload
>
> In the [v1 signed payload format](https://docs.omni.co/embed/setup/standard-sso/latest.md), send the value as JSON:
>
> ```json v1 payload wrap theme={null}
> modelRoles={"65b10d2a-473b-4486-92c8-0ba628c7d1cb":"RESTRICTED_QUERIER"}
> ```

> [tab] v0 (legacy) payload
>
> In the [legacy v0 format](https://docs.omni.co/embed/setup/standard-sso/v0-legacy.md), stringify and URL encode the value before sending:
>
> ```markdown v0 (legacy) payload wrap theme={null}
> modelRoles=%7B%2265b10d2a-473b-4486-92c8-0ba628c7d1cb%22%3A%22RESTRICTED_QUERIER%22%7D
> ```


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