# uip platform groups

> Syntax and options for `uip platform groups`, which manages group-based license-allocation rules for user bundles.

`uip platform groups` manages group-based license-allocation rules. A rule attaches a set of user bundles (and optional per-bundle quotas) to a directory group; members of the group automatically lease the entitled bundles. Use `rules get` to list every group's rule across the organization, `rules details` to inspect one group's rule with its member-level leases, and `rules set` to configure entitlements and quotas.

## Synopsis

```
uip platform groups rules <verb> [options] [<group>]
```

## Verbs

| Verb | Purpose |
|---|---|
| `get` | List group license-allocation rules with quota configuration and current usage. Paginated. |
| `details` | Get one group's rule, with the paginated list of group members and the bundles each one is leasing. |
| `set` | Set (or replace) the user-bundle allocation rule and optional per-bundle quotas for a group. |

## Group resolution

`details` and `set` take a `<group>` positional argument — a name prefix. The CLI searches directory groups and requires **exactly one** match:

- No match → error with `"No directory group found matching '<input>'."`.
- Multiple matches → error listing candidates so you can refine the input.

## uip platform groups rules get

List group license-allocation rules across the organization. Each row is one `(group, bundle)` pair; groups with multiple entitled bundles produce one row per bundle. The response includes the group's own per-bundle quota (`quota`) and the current usage against that quota (`currentUsage`), plus a `useExternalLicense` flag indicating whether the group is configured to lease bundles from external licensing.

### Options

| Long | Value | Default | Description |
|---|---|---|---|
| `--limit` | number | `50` | Maximum number of results to return. |
| `--offset` | number | `0` | Number of results to skip. |
| `--sort-by` | field | — | Field to sort by. Accepted values: `Id`, `GlobalId`, `GroupId`, `OrganizationId`, `UseExternalLicense`, `UserBundleCodesAsJson`, `UserBundleCodes`. Anything else returns HTTP 400 — for example `name` is not accepted. |
| `--sort-order` | enum | — | Sort order: `Asc` or `Desc`. |
| `--organization` | account-id | session default | Organization account GUID. Override the org resolved from the current login. |

### Example

```bash
uip platform groups rules get --limit 50
uip platform groups rules get --sort-by GroupId --sort-order Asc
```

### Data shape (--output json)

```json
{
  "Code": "GroupRules",
  "Data": [
    {
      "groupId": "35551807-06b1-4cda-90a1-2fb84851eee7",
      "groupName": "RPA Developers",
      "code": "RPADEVPRONU",
      "name": "RPADEVPRONU",
      "quota": 25,
      "currentUsage": 12,
      "useExternalLicense": false
    }
  ]
}
```

The response also includes pagination metadata (returned, limit, offset, total).

## uip platform groups rules details

Get a group's license-allocation rule with quotas, flattened to one row per `(user, bundle leased)`. Users with no leases yet appear as a single row with null bundle columns. The user list is paginated; use `--limit` and `--offset` to page through it. A header summary (entitled bundles, quotas as `used/limit`, `useExternalLicense`) is written to stderr so it does not interfere with the JSON data on stdout.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<group>` | yes | Group identifier (name prefix; must match exactly one directory group). |

### Options

| Long | Value | Default | Description |
|---|---|---|---|
| `--limit` | number | `50` | Maximum number of users to return. |
| `--offset` | number | `0` | Number of users to skip. |
| `--sort-by` | field | — | Field to sort users by. Validated server-side by the License Accountant; an unsupported field returns HTTP 400. The accepted field list isn't enumerated in the CLI source for this endpoint (unlike `rules get`) — check the API response if a guess is rejected. |
| `--sort-order` | enum | — | User sort order: `Asc` or `Desc`. |
| `--organization` | account-id | session default | Organization account GUID. Override the org resolved from the current login. |

### Example

```bash
uip platform groups rules details "RPA Developers" --limit 100
```

### Data shape (--output json)

```json
{
  "Code": "GroupRuleDetails",
  "Data": [
    {
      "userDisplayName": "Dan Dinu",
      "email": "dan.dinu@uipath.com",
      "lastInUse": "2026-05-10T08:15:00.000Z",
      "orphan": false,
      "bundleCode": "RPADEVPRONU",
      "bundleName": "RPADEVPRONU",
      "quota": 25,
      "currentUsage": 12
    }
  ]
}
```

The response also includes pagination metadata (returned, limit, offset, total) over the user list, exactly like `rules get`.

## uip platform groups rules set

Set the user-bundle allocation rule for a group, optionally with per-bundle quotas. Omitting `quota` on an entry means no quota enforcement for that bundle. The new rule replaces the group's previous bundle list — bundles not listed in `--input` are removed from the rule.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<group>` | yes | Group identifier (name prefix; must match exactly one directory group). |

### Options

| Long | Value | Default | Description |
|---|---|---|---|
| `--input` | path | **required** | Path to a JSON file with the rule, for example `[{"code":"RPADEVPRONU"},{"code":"ATTUNU","quota":10}]`. |
| `--organization` | account-id | session default | Organization account GUID. Override the org resolved from the current login. |

### Example

```bash
uip platform groups rules set "RPA Developers" \
    --input ./group-rule.json
```

`group-rule.json`:

```json
[
  { "code": "RPADEVPRONU", "quota": 25 },
  { "code": "ATTUNU" }
]
```

### Data shape (--output json)

```json
{
  "Code": "GroupRuleSet",
  "Data": [
    { "code": "RPADEVPRONU", "name": "RPADEVPRONU", "quota": 25, "currentUsage": 12 },
    { "code": "ATTUNU",      "name": "ATTUNU",      "quota": null, "currentUsage": null }
  ]
}
```

## Exit codes

See [Exit codes](./exit-codes.md). No verb-specific overrides.

## Related commands

- [`uip platform users`](./uip-platform-users.md) — direct user-bundle allocation; `users licenses get` shows which bundles a member is leasing from each group rule.
- [`uip platform tenants`](./uip-platform-tenants.md) — tenant-level runtime and consumable allocation.

## See also

- [Global options](./global-options.md).
