---
title: "ezgh iam users update"
description: "Change the groups a user is in, or replace the policies attached to them directly."
---

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

# ezgh iam users update

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh iam users update <user> [--groups g,…] [--add-groups g,…] [--remove-groups g,…] [--policies p,…] [flags]
```

Change the groups a user is in, or replace the policies attached to them directly.

`--groups` and `--policies` replace the whole list (give "" for none). They're sent with the ETag ezgh read, so if someone else changed the user in between, nothing is changed and ezgh says so; run it again. `--add-groups` and `--remove-groups` change one group at a time and leave the rest alone, as `ezgh iam policies attach|detach` do for policies.

Part of [`ezgh iam users`](/cli/reference/iam-users).

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--add-groups` | strings, comma-separated or repeated |  | add to these groups, leaving the others |
| `--groups` | strings, comma-separated or repeated |  | the groups (IDs, slugs or names), replacing all current ones; "" for none |
| `--policies` | strings, comma-separated or repeated |  | the policies (managed names, IDs, slugs or names), replacing all current ones; "" for none |
| `--remove-groups` | strings, comma-separated or repeated |  | remove from these groups, leaving the others |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/iam-users-update/index.mdx
