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

# Users commands - Omni CLI

> Reference for the omni users command group: manage user and group model roles, email-only users, and user attribute values.

Manage [user](/api/user-model-roles) and [group model roles](/api/user-group-model-roles), and [email-only users](/api/users/list-email-only-users).

```bash wrap theme={null}
omni users <command>
```

| Command                         | Description                                        |
| ------------------------------- | -------------------------------------------------- |
| `get-model-roles`               | Get user model roles                               |
| `assign-model-role`             | Assign a model role to a user                      |
| `list-email-only`               | List email-only users                              |
| `create-email-only`             | Create or update an email-only user                |
| `create-email-only-bulk`        | Create email-only users in bulk                    |
| `set-attributes`                | Set Omni user attribute values on an existing user |
| `user-groups-get-model-roles`   | Get user group model roles                         |
| `user-groups-assign-model-role` | Assign a model role to a user group                |

```bash wrap theme={null}
# Create an email-only user
omni users create-email-only --body '{"email":"blob.ross@blobsrus.com"}'

# View help for user-groups-assign-model-role command, including arguments and flag details
omni users user-groups-assign-model-role --help
```

## omni users set-attributes

Sets [user attribute](/administration/users/attributes) values on an existing user via a SCIM PATCH, changing only the attributes you name. Identify the user by SCIM user ID or by email (any value containing `@` is resolved to an ID via a SCIM lookup first).

```bash wrap theme={null}
# Set string attributes by user ID
omni users set-attributes <user-id> --attr region=us-east --attr team=growth

# Identify the user by email instead, and clear an attribute
omni users set-attributes user@example.com --attr region=

# Set numeric or multi-value (array) attributes with --attr-json
omni users set-attributes user@example.com --attr-json '{"level":3,"regions":["us","eu"]}'
```

<Note>
  Every command in this group also accepts the [global flags](/developers/cli/reference/global-flags), including `--token`, `--profile`, `--format`, and `--compact`.
</Note>
