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

# group

> cpln group — Manage groups for organizing users and service accounts.

Manage groups

For a detailed overview, please visit the [group's](https://docs.controlplane.com/reference/group.md) reference page.

```none theme={null}
cpln group [SUBCOMMAND]
```

```text theme={null}
Commands:
  cpln group access-report <ref>  Show the access report for the referenced group
  cpln group add-member <ref>     Add members to the referenced group
  cpln group audit [ref]          Retrieve audit trail events for the referenced group
  cpln group clone <ref>          Create a clone of the referenced group; this will only duplicate its spec.  [aliases: copy]
  cpln group create               Create a new group
  cpln group delete <ref...>      Delete one or more referenced groups
  cpln group edit <ref>           Edit the referenced group, as YAML, within an editor
  cpln group eventlog <ref>       Show the event log of the referenced group  [aliases: log]
  cpln group get [ref...]         Retrieve one or more referenced groups
  cpln group patch <ref>          Update the referenced group's metadata using an input file
  cpln group permissions          Show the grantable permissions for a group object type
  cpln group query                Find all the groups based on the given query
  cpln group remove-member <ref>  Remove members from the referenced group
  cpln group tag <ref...>         Manage the tags belonging to one or more referenced groups
  cpln group update <ref>         Update properties of the referenced group

Options:
  --help  Show help  [boolean]
```

***

#### group access-report

Show the access report for the referenced group

**Usage**

```none theme={null}
cpln group access-report <ref> [OPTIONS]
```

> [accordion] Reference
>
> ```text theme={null}
> Positionals:
>   ref  The resource reference. Usually it is the name of the resource.  [required]
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Example
>
> ```bash Command theme={null}
> cpln group access-report demo-group --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------+--------------------------------------------------------+--------+
> |PERMISSION |PRINCIPAL                                               |GRANTED |
> |-----------|--------------------------------------------------------|--------|
> |create     |/org/demo-cpln-organization/group/superusers            |manage  |
> |create     |/org/demo-cpln-organization/serviceaccount/controlplane |manage  |
> |delete     |/org/demo-cpln-organization/group/superusers            |manage  |
> |delete     |/org/demo-cpln-organization/serviceaccount/controlplane |manage  |
> |edit       |/org/demo-cpln-organization/group/superusers            |manage  |
> |edit       |/org/demo-cpln-organization/serviceaccount/controlplane |manage  |
> |manage     |/org/demo-cpln-organization/group/superusers            |manage  |
> |manage     |/org/demo-cpln-organization/serviceaccount/controlplane |manage  |
> |view       |/org/demo-cpln-organization/group/viewers               |view    |
> |view       |/org/demo-cpln-organization/group/superusers            |manage  |
> |view       |/org/demo-cpln-organization/serviceaccount/controlplane |manage  |
> +-----------+--------------------------------------------------------+--------+
> ```

***

#### group add-member

Add members to the referenced group

**Usage**

```none theme={null}
cpln group add-member <ref> --email USER_EMAIL [OPTIONS]

cpln group add-member <ref> --serviceaccount SERVICE_ACCOUNT [OPTIONS]
```

> [accordion] Reference
>
> ```text theme={null}
> Positionals:
>   ref  The resource reference. Usually it is the name of the resource.  [required]
>
> Command options:
>   --email           Email of user to add
>   --serviceaccount  Name of the service account to add
>   --dry-run         Validate the request and print the resource that would be written, without writing it. Defaults the output format to yaml-slim  [boolean]
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Example
>
> * Add a user to a group
>
> ```bash Command theme={null}
> cpln group add-member demo-group --email test-128@example.com --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------+------------+-------------+-------+--------+--------------+
> |NAME       |DESCRIPTION |CREATED      |FILTER |ORIGIN  |TAGS          |
> |-----------|------------|-------------|-------|--------|--------------|
> |demo-group |demo-group  |1 minute ago |links  |default |drink="water" |
> +-----------+------------+-------------+-------+--------+--------------+
> ```
>
> * Add a service account to a group using email
>
> ```bash Command theme={null}
> cpln group add-member demo-group --serviceaccount controlplane --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------+------------+-------------+-------+--------+--------------+
> |NAME       |DESCRIPTION |CREATED      |FILTER |ORIGIN  |TAGS          |
> |-----------|------------|-------------|-------|--------|--------------|
> |demo-group |demo-group  |1 minute ago |links  |default |drink="water" |
> +-----------+------------+-------------+-------+--------+--------------+
> ```

***

#### group audit

Retrieve audit trail events for the referenced group

**Usage**

```none theme={null}
cpln group audit [ref] [OPTIONS]
```

> [accordion] Reference
>
> ```text theme={null}
> Positionals:
>   ref  The resource reference. Usually it is the name of the resource.
>
> Command options:
>   --subject  Filter by subject (serviceaccount name or user email)  [string]
>   --context  Audit context name (the 'cpln' context displays Control Plane actions)  [string] [default: "cpln"]
>   --since    Relative lookback window from now (e.g., 1h, 24h, 7d). Mutually exclusive with --from/--to  [string] [default: "7d"]
>   --from     Start time for audit events (ISO 8601 format or relative duration, e.g., 2025-10-23T07:00:00Z, 7d, 1h). Cannot be used with --since  [string]
>   --to       End time for audit events (ISO 8601 format or relative duration, e.g., 2025-10-23T07:00:00Z, 1d, 30m)  [string]
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

***

#### group clone

Create a clone of the referenced group; this will only duplicate its spec.

**Usage**

```none theme={null}
cpln group clone <ref> --name CLONE_NAME [OPTIONS]
```

> [accordion] Reference
>
> ```text theme={null}
> Positionals:
>   ref  The resource reference. Usually it is the name of the resource.  [required]
>
> Command options:
>   --name         Set the name for the clone  [required]
>   --description  Optional description, defaults to the name if not set
>   --tag          Attach tags (e.g., --tag drink=water)
>   --dry-run      Validate the request and print the resource that would be written, without writing it. Defaults the output format to yaml-slim  [boolean]
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Example
>
> ```bash Command theme={null}
> cpln group clone demo-group --name demo-group-clone --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------------+--------------------+--------+-------+--------+--------------+
> |NAME             |DESCRIPTION         |CREATED |FILTER |ORIGIN  |TAGS          |
> |-----------------|--------------------|--------|-------|--------|--------------|
> |demo-group-clone |Clone of demo-group |Now     |links  |default |drink="water" |
> +-----------------+--------------------+--------+-------+--------+--------------+
> ```

***

#### group create

Create a new group

**Usage**

```none theme={null}
cpln group create --name GROUP_NAME [OPTIONS]
```

> [!TIP]
>
> After creating a new group, use the subcommand [add-member](#group-add-member) to populate the group with users and/or service accounts.

> [accordion] Reference
>
> ```text theme={null}
> Command options:
>   --name                 Name of the new group  [required]
>   --description, --desc  Optional description, defaults to the name if not set
>   --tag                  Attach tags (e.g., --tag drink=water)
>   --dry-run              Validate the request and print the resource that would be written, without writing it. Defaults the output format to yaml-slim  [boolean]
>
> Query spec options:
>   --query-match     Query filter type  [choices: "all", "none", "any"] [default: "all"]
>   --query-property  Property to query
>   --query-tag       Tag to query
>   --query-rel       Relation to query
>   --query-kind      Kind to query  [choices: "user"]
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Example
>
> ```bash Command theme={null}
> cpln group create --name demo-group --desc demo-group --tag drink=water --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------+------------+--------+-------+--------+--------------+
> |NAME       |DESCRIPTION |CREATED |FILTER |ORIGIN  |TAGS          |
> |-----------|------------|--------|-------|--------|--------------|
> |demo-group |demo-group  |Now     |links  |default |drink="water" |
> +-----------+------------+--------+-------+--------+--------------+
> ```

***

#### group delete

Delete one or more referenced groups

**Usage**

```none theme={null}
cpln group delete <ref...> [OPTIONS]
```

> [accordion] Reference
>
> ```text theme={null}
> Positionals:
>   ref  One or more resource references. Usually it is the name of the resource.  [array] [required] [default: []]
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Example
>
> ```bash Command theme={null}
> cpln group delete demo-group --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> If the delete was successful, a new command prompt will be shown.
> ```

***

#### group edit

Edit the referenced group, as YAML, within an editor

**Usage**

```none theme={null}
cpln group edit <ref> [OPTIONS]
```

> [!NOTE]
>
> The default editor can be set by using the EDITOR environment variable.

> [accordion] Reference
>
> ```text theme={null}
> Positionals:
>   ref  The resource reference. Usually it is the name of the resource.  [required]
>
> Command options:
>   --replace, -r  Replace instead of patch/merge  [boolean] [default: false]
>   --dry-run      Validate the request and print the resource that would be written, without writing it. Defaults the output format to yaml-slim  [boolean]
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Example
>
> ```bash Command theme={null}
> cpln group edit demo-group --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> Your default editor will be launched.
>
> Once any modifications are saved, the updates will be sent to the API.
> ```

***

#### group eventlog

Show the event log of the referenced group

**Usage**

```none theme={null}
cpln group eventlog <ref> [OPTIONS]
```

> [accordion] Reference
>
> ```text theme={null}
> Positionals:
>   ref  The resource reference. Usually it is the name of the resource.  [required]
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Example
>
> ```bash Command theme={null}
> cpln group eventlog demo-group --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> The event log for the referenced group will be shown.
> ```

***

#### group get

Retrieve one or more referenced groups

**Usage**

```none theme={null}
cpln group get [ref...] [OPTIONS]
```

> [!NOTE]
>
> An empty reference will return all references

> [accordion] Reference
>
> ```text theme={null}
> Positionals:
>   ref  One or more resource references. Usually it is the name of the resource.  [array] [default: []]
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Example
>
> * Get all groups
>
> ```bash Command theme={null}
> cpln group get --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------------+-----------------------------------------+-------------+-------+--------+--------------+
> |NAME             |DESCRIPTION                              |CREATED      |FILTER |ORIGIN  |TAGS          |
> |-----------------|-----------------------------------------|-------------|-------|--------|--------------|
> |demo-group       |demo-group                               |1 minute ago |links  |default |drink="water" |
> |demo-group-get-1 |demo-group-get-1                         |Now          |links  |default |              |
> |demo-group-get-2 |demo-group-get-2                         |Now          |links  |default |              |
> |superusers       |Built-in group for all administrators... |5 years ago  |links  |builtin |              |
> |viewers          |Built-in group for read-only access      |5 years ago  |links  |builtin |              |
> +-----------------+-----------------------------------------+-------------+-------+--------+--------------+
> ```
>
> * Get one group
>
> ```bash Command theme={null}
> cpln group get demo-group-get-1 --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------------+-----------------+--------+-------+--------+-----+
> |NAME             |DESCRIPTION      |CREATED |FILTER |ORIGIN  |TAGS |
> |-----------------|-----------------|--------|-------|--------|-----|
> |demo-group-get-1 |demo-group-get-1 |Now     |links  |default |     |
> +-----------------+-----------------+--------+-------+--------+-----+
> ```
>
> * Get multiple groups
>
> ```bash Command theme={null}
> cpln group get demo-group-get-1 demo-group-get-2 --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------------+-----------------+--------+-------+--------+-----+
> |NAME             |DESCRIPTION      |CREATED |FILTER |ORIGIN  |TAGS |
> |-----------------|-----------------|--------|-------|--------|-----|
> |demo-group-get-1 |demo-group-get-1 |Now     |links  |default |     |
> |demo-group-get-2 |demo-group-get-2 |Now     |links  |default |     |
> +-----------------+-----------------+--------+-------+--------+-----+
> ```

***

#### group patch

Update the referenced group's metadata using an input file

**Usage**

```none theme={null}
cpln group patch <ref> --file FILE_NAME [OPTIONS]
```

> [!NOTE]
>
> Running this command with the option **`--file -`** sets the input to stdin. The input is required to be a valid JSON or YAML string (e.g., `{"description": "My new description"}` or `description: My new description`). To complete the update, press Control-D (or Control-Z if you are using Windows).

> [accordion] Reference
>
> ```text theme={null}
> Positionals:
>   ref  The resource reference. Usually it is the name of the resource.  [required]
>
> Command options:
>   --file, -f  File to load the patch from. Use `--file -` to enable input from stdin.  [required]
>   --dry-run   Validate the request and print the resource that would be written, without writing it. Defaults the output format to yaml-slim  [boolean]
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Example
>
> ```bash Command theme={null}
> cpln group patch demo-group --file update.json --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> The changes within the JSON file will be performed against the referenced group.
> ```

***

#### group permissions

Show the grantable permissions for a group object type

**Usage**

```none theme={null}
cpln group permissions [OPTIONS]
```

> [accordion] Reference
>
> ```text theme={null}
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Example
>
> ```bash Command theme={null}
> cpln group permissions --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-------+-----------------------+-----------------------------------+
> |NAME   |DESCRIPTION            |IMPLIES                            |
> |-------|-----------------------|-----------------------------------|
> |create |Create new groups      |                                   |
> |delete |Delete a group         |                                   |
> |edit   |Modify existing groups |view                               |
> |manage |Full access            |create, delete, edit, manage, view |
> |view   |Read-only view         |                                   |
> +-------+-----------------------+-----------------------------------+
> ```

***

#### group query

Find all the groups based on the given query

**Usage**

```none theme={null}
cpln group query QUERY_OPTIONS [OPTIONS]
```

> [accordion] Reference
>
> ```text theme={null}
> Query options:
>   --match             Query filter type  [choices: "all", "none", "any"] [default: "all"]
>   --property, --prop  Property to query
>   --tag               Tag to query
>   --rel               Relation to query
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Example
>
> > [!NOTE]
> >
> > Use the `--match` option to display **all**, **none**, or **any** of the results based on a given property or tag
>
> * Search for a group based on the name property
>
> ```bash Command theme={null}
> cpln group query --match any --prop name=demo-group --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------+------------+-------------+-------+--------+--------------+
> |NAME       |DESCRIPTION |CREATED      |FILTER |ORIGIN  |TAGS          |
> |-----------|------------|-------------|-------|--------|--------------|
> |demo-group |demo-group  |1 minute ago |links  |default |drink="water" |
> +-----------+------------+-------------+-------+--------+--------------+
> ```
>
> * Search for a group based on the description property
>
> ```bash Command theme={null}
> cpln group query --match any --prop description="demo-group" --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------+------------+-------------+-------+--------+--------------+
> |NAME       |DESCRIPTION |CREATED      |FILTER |ORIGIN  |TAGS          |
> |-----------|------------|-------------|-------|--------|--------------|
> |demo-group |demo-group  |1 minute ago |links  |default |drink="water" |
> +-----------+------------+-------------+-------+--------+--------------+
> ```
>
> * Search for a group based on a tag
>
> ```bash Command theme={null}
> cpln group query --match any --tag drink=water --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------+------------+-------------+-------+--------+--------------+
> |NAME       |DESCRIPTION |CREATED      |FILTER |ORIGIN  |TAGS          |
> |-----------|------------|-------------|-------|--------|--------------|
> |demo-group |demo-group  |1 minute ago |links  |default |drink="water" |
> +-----------+------------+-------------+-------+--------+--------------+
> ```
>
> * Search for a group based on a property and tag
>
> ```bash Command theme={null}
> cpln group query --match any --prop description="demo-group" --tag drink=water --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------+------------+-------------+-------+--------+--------------+
> |NAME       |DESCRIPTION |CREATED      |FILTER |ORIGIN  |TAGS          |
> |-----------|------------|-------------|-------|--------|--------------|
> |demo-group |demo-group  |1 minute ago |links  |default |drink="water" |
> +-----------+------------+-------------+-------+--------+--------------+
> ```

***

#### group remove-member

Remove members from the referenced group

**Usage**

```none theme={null}
cpln group remove-member <ref> --email USER_EMAIL [OPTIONS]

cpln group remove-member <ref> --serviceaccount SERVICE_ACCOUNT [OPTIONS]
```

> [accordion] Reference
>
> ```text theme={null}
> Positionals:
>   ref  The resource reference. Usually it is the name of the resource.  [required]
>
> Command options:
>   --email           Email of user to remove
>   --serviceaccount  Name of the service account to remove
>   --dry-run         Validate the request and print the resource that would be written, without writing it. Defaults the output format to yaml-slim  [boolean]
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Example
>
> > [!NOTE]
> >
> > The user and service account referenced in the examples below were previously added to the group
>
> * Remove a user to a group
>
> ```bash Command theme={null}
> cpln group remove-member demo-group --email test-128@example.com --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------+------------+-------------+-------+--------+--------------+
> |NAME       |DESCRIPTION |CREATED      |FILTER |ORIGIN  |TAGS          |
> |-----------|------------|-------------|-------|--------|--------------|
> |demo-group |demo-group  |1 minute ago |links  |default |drink="water" |
> +-----------+------------+-------------+-------+--------+--------------+
> ```
>
> * Remove a service account to a group using email
>
> ```bash Command theme={null}
> cpln group remove-member demo-group --serviceaccount controlplane --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------+------------+-------------+-------+--------+--------------+
> |NAME       |DESCRIPTION |CREATED      |FILTER |ORIGIN  |TAGS          |
> |-----------|------------|-------------|-------|--------|--------------|
> |demo-group |demo-group  |1 minute ago |links  |default |drink="water" |
> +-----------+------------+-------------+-------+--------+--------------+
> ```

***

#### group tag

Manage the tags belonging to one or more referenced groups

**Usage**

```none theme={null}
cpln group tag <ref...> --tag KEY=VALUE [OPTIONS]
```

> [!NOTE]
>
> Built-in tags, which begin with cpln/\*, can't be modified.

> [accordion] Reference
>
> ```text theme={null}
> Positionals:
>   ref  One or more resource references. Usually it is the name of the resource.  [array] [required] [default: []]
>
> Command options:
>   --tag         Attach tags (e.g., --tag drink=water)
>   --remove-tag  Remove tags (e.g., --remove-tag tagname)
>   --dry-run     Validate the request and print the resource that would be written, without writing it. Defaults the output format to yaml-slim  [boolean]
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Example
>
> * Add a tag to a group
>
> ```bash Command theme={null}
> cpln group tag demo-group-tag-1 --tag drink=water --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------------+-----------------+--------+-------+--------+--------------+
> |NAME             |DESCRIPTION      |CREATED |FILTER |ORIGIN  |TAGS          |
> |-----------------|-----------------|--------|-------|--------|--------------|
> |demo-group-tag-1 |demo-group-tag-1 |Now     |links  |default |drink="water" |
> +-----------------+-----------------+--------+-------+--------+--------------+
> ```
>
> * Update same tag (after running the example above)
>
> ```bash Command theme={null}
> cpln group tag demo-group-tag-1 --tag drink=coffee --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------------+-----------------+--------+-------+--------+---------------+
> |NAME             |DESCRIPTION      |CREATED |FILTER |ORIGIN  |TAGS           |
> |-----------------|-----------------|--------|-------|--------|---------------|
> |demo-group-tag-1 |demo-group-tag-1 |Now     |links  |default |drink="coffee" |
> +-----------------+-----------------+--------+-------+--------+---------------+
> ```
>
> * Remove tag (after running the example above)
>
> ```bash Command theme={null}
> cpln group tag demo-group-tag-1 --remove-tag drink --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------------+-----------------+--------+-------+--------+-----+
> |NAME             |DESCRIPTION      |CREATED |FILTER |ORIGIN  |TAGS |
> |-----------------|-----------------|--------|-------|--------|-----|
> |demo-group-tag-1 |demo-group-tag-1 |Now     |links  |default |     |
> +-----------------+-----------------+--------+-------+--------+-----+
> ```
>
> * Add same tag to multiple groups
>
> ```bash Command theme={null}
> cpln group tag demo-group-tag-1 demo-group-tag-2 --tag multiple-groups=true --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------------+-----------------+--------+-------+--------+-----------------------+
> |NAME             |DESCRIPTION      |CREATED |FILTER |ORIGIN  |TAGS                   |
> |-----------------|-----------------|--------|-------|--------|-----------------------|
> |demo-group-tag-1 |demo-group-tag-1 |Now     |links  |default |multiple-groups="true" |
> |demo-group-tag-2 |demo-group-tag-2 |Now     |links  |default |multiple-groups="true" |
> +-----------------+-----------------+--------+-------+--------+-----------------------+
> ```
>
> * Update same tag on multiple groups (after running the example above)
>
> ```bash Command theme={null}
> cpln group tag demo-group-tag-1 demo-group-tag-2 --tag multiple-groups=demo-group --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------------+-----------------+--------+-------+--------+-----------------------------+
> |NAME             |DESCRIPTION      |CREATED |FILTER |ORIGIN  |TAGS                         |
> |-----------------|-----------------|--------|-------|--------|-----------------------------|
> |demo-group-tag-1 |demo-group-tag-1 |Now     |links  |default |multiple-groups="demo-group" |
> |demo-group-tag-2 |demo-group-tag-2 |Now     |links  |default |multiple-groups="demo-group" |
> +-----------------+-----------------+--------+-------+--------+-----------------------------+
> ```
>
> * Remove same tag from multiple groups (after running the example above)
>
> ```bash Command theme={null}
> cpln group tag demo-group-tag-1 demo-group-tag-2 --remove-tag multiple-groups --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +-----------------+-----------------+--------+-------+--------+-----+
> |NAME             |DESCRIPTION      |CREATED |FILTER |ORIGIN  |TAGS |
> |-----------------|-----------------|--------|-------|--------|-----|
> |demo-group-tag-1 |demo-group-tag-1 |Now     |links  |default |     |
> |demo-group-tag-2 |demo-group-tag-2 |Now     |links  |default |     |
> +-----------------+-----------------+--------+-------+--------+-----+
> ```

***

#### group update

Update properties of the referenced group

**Usage**

```none theme={null}
cpln group update <ref> --set UPDATE_PROPERTY [OPTIONS]
```

> [accordion] Reference
>
> ```text theme={null}
> Positionals:
>   ref  The resource reference. Usually it is the name of the resource.  [required]
>
> Update Properties:
>   --set    Update the following properties (e.g., --set description="Updated Description"):
>
>            description    string
>            tags.<key>     string
>            memberLinks    string[]
>
>            Arrays can be appended to, replaced, or removed using the `+=`, `=`, or `-=` operators, respectively.
>   --unset  Unset a property (same paths as --set, e.g., --unset description)
>
> Command options:
>   --dry-run  Validate the request and print the resource that would be written, without writing it. Defaults the output format to yaml-slim  [boolean]
>
> Context options:
>   --profile  Override the profile. The default profile can be set using the `cpln profile set-default` command or by setting the CPLN_PROFILE environment variable
>   --org      Override the organization. The default organization can be set in your profile by using the `cpln profile update` command
>
> Format options:
>   --output, -o  Set the output format  [choices: "text", "json", "yaml", "json-slim", "yaml-slim", "tf", "crd", "names"]
>   --color       Colorize the output  [boolean] [default: true]
>   --ts          Timestamp format if the output format is text (e.g., --output=text)  [choices: "iso", "local", "age"]
>   --max         Maximum number of records to show. A value less than 1 will return all records.  [number] [default: 50]
>
> Request options:
>   --token         Override the authorization token
>   --endpoint      Override the API URL
>   --insecure, -k  Ignore TLS errors  [boolean]
>
> Debug options:
>   --verbose, -v  Enable verbose output to stderr  [boolean] [default: false]
>   --debug, -d    Show all HTTP communications  [boolean] [default: false]
>
> Options:
>   --help  Show help  [boolean]
> ```
>
> [Common Options Reference](https://docs.controlplane.com/cli-reference/using-cli/common-options.md)

> [accordion] Options
>
> * The `--set` option allows the modification of the following group properties:
>   * `description`
>     * Description of the group
>     * Type: string
>   * `tags`
>     * Tags (key=value) associated with the group
>     * Type: string
>   * `memberLinks`
>     * Array of links belonging to members of the group
>     * Type: string\[]

> [accordion] Example
>
> * For the examples below, the initial group is configured as:
>
> ```text theme={null}
> +------------------+------------------+--------+-------+--------+-----+
> |NAME              |DESCRIPTION       |CREATED |FILTER |ORIGIN  |TAGS |
> |------------------|------------------|--------|-------|--------|-----|
> |demo-group-update |demo-group-update |Now     |links  |default |     |
> +------------------+------------------+--------+-------+--------+-----+
> ```
>
> * Update a group's description
>
> ```bash Command theme={null}
> cpln group update demo-group-update --set description="new description" --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +------------------+----------------+--------+-------+--------+-----+
> |NAME              |DESCRIPTION     |CREATED |FILTER |ORIGIN  |TAGS |
> |------------------|----------------|--------|-------|--------|-----|
> |demo-group-update |new description |Now     |links  |default |     |
> +------------------+----------------+--------+-------+--------+-----+
> ```
>
> * Update a group's tags
>
> ```bash Command theme={null}
> cpln group update demo-group-update --set tags.demo-key=demo-value --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +------------------+----------------+--------+-------+--------+----------------------+
> |NAME              |DESCRIPTION     |CREATED |FILTER |ORIGIN  |TAGS                  |
> |------------------|----------------|--------|-------|--------|----------------------|
> |demo-group-update |new description |Now     |links  |default |demo-key="demo-value" |
> +------------------+----------------+--------+-------+--------+----------------------+
> ```
>
> * Add to a group's member links. This examples adds the built-in controlplane service account
>
> ```bash Command theme={null}
> cpln group update demo-group-update --set memberLinks+="/org/demo-cpln-organization/serviceaccount/controlplane" --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +------------------+----------------+--------+-------+--------+----------------------+
> |NAME              |DESCRIPTION     |CREATED |FILTER |ORIGIN  |TAGS                  |
> |------------------|----------------|--------|-------|--------|----------------------|
> |demo-group-update |new description |Now     |links  |default |demo-key="demo-value" |
> +------------------+----------------+--------+-------+--------+----------------------+
> ```
>
> * Remove from a group's member links. This examples removes the built-in controlplane service account
>
> ```bash Command theme={null}
> cpln group update demo-group-update --set memberLinks-="/org/demo-cpln-organization/serviceaccount/controlplane" --org demo-cpln-organization
> ```
>
> ```text Output theme={null}
> +------------------+----------------+--------+-------+--------+----------------------+
> |NAME              |DESCRIPTION     |CREATED |FILTER |ORIGIN  |TAGS                  |
> |------------------|----------------|--------|-------|--------|----------------------|
> |demo-group-update |new description |Now     |links  |default |demo-key="demo-value" |
> +------------------+----------------+--------+-------+--------+----------------------+
> ```

***
