# uip or licenses

> Syntax and options for `uip or licenses`, which inspects and manages Orchestrator license allocation for runtimes and named users.

`uip or licenses` inspects and manages Orchestrator license allocation. List runtime and named-user license assignments, toggle machine licensing on or off, and view the overall tenant license summary (allowed vs used per robot type).

## Synopsis

```
uip or licenses <verb> [options]
```

## Verbs

| Verb | Purpose |
|---|---|
| `list` | List license assignments for a given robot type (runtime or named-user). |
| `toggle` | Enable or disable machine licensing for a specific runtime robot type. |
| `info` | Show the tenant license summary (subscription plan, allowed/used, features). |

## Robot type reference

The `--type` flag accepts these robot types. The command behavior splits into two buckets:

- **Runtime types** — machine-level allocation: `Unattended`, `NonProduction`, `Headless`, `TestAutomation`.
- **Named-user types** — user-level allocation: `Attended`, `Development`, `Studio`, `StudioX`, `RpaDeveloper`, `CitizenDeveloper`.

`licenses list` accepts both buckets; `licenses toggle` accepts only runtime types.

## uip or licenses list

List license assignments for a given robot type.

- For **runtime types**, each row is a machine with a connected robot; `MachineName`, `MachineType`, `Runtimes`, `IsOnline`, `IsLicensed`, and `Enabled` are returned.
- For **named-user types**, each row is a user; `UserName`, `LastLoginDate`, `MachinesCount`, `IsLicensed`, and `MachineNames` are returned.

### Options

| Short | Long | Value | Default | Description |
|---|---|---|---|---|
| — | `--type` | enum | **required** | Robot type (see list above). |
| — | `--licensed` | flag | off | Only licensed entries. Mutually exclusive with `--unlicensed`. |
| — | `--unlicensed` | flag | off | Only unlicensed entries. Mutually exclusive with `--licensed`. |
| `-l` | `--limit` | number | `50` | Page size. |
| — | `--offset` | number | `0` | Skip count. |
| — | `--sort-by` | field | — | OData sort (for example, `MachineName desc`). |

### Examples

```bash
uip or licenses list --type Unattended --limit 50
uip or licenses list --type Attended --unlicensed
uip or licenses list --type Unattended \
    --output-filter 'Data[?IsOnline].MachineName'
```

### Data shape (--output json)

Runtime type:

```json
{
  "Code": "LicenseList",
  "Data": [
    {
      "Key": "a1b2c3d4-0000-0000-0000-000000000001",
      "MachineName": "prod-worker-01",
      "MachineType": "Standard",
      "Runtimes": 3,
      "IsOnline": true,
      "IsLicensed": true,
      "Enabled": true
    }
  ]
}
```

Named-user type:

```json
{
  "Code": "LicenseList",
  "Data": [
    {
      "Key": "d4e5f6a7-0000-0000-0000-000000000001",
      "UserName": "dev@example.com",
      "LastLoginDate": "2025-04-15T10:30:00Z",
      "MachinesCount": 2,
      "IsLicensed": true,
      "MachineNames": ["studio-01", "studio-02"]
    }
  ]
}
```

## uip or licenses toggle

Enable or disable machine licensing for a specific runtime robot type. Named-user types are rejected. Accepts a machine key (GUID) — internally resolved to a machine name before calling the API.

Exactly one of `--enable` or `--disable` must be provided.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<machine-key>` | yes | Machine key (GUID). Find it with `machines list`. |

### Options

| Short | Long | Value | Default | Description |
|---|---|---|---|---|
| — | `--type` | enum | **required** | Runtime robot type only: `Unattended`, `NonProduction`, `Headless`, `TestAutomation`. |
| — | `--enable` | flag | — | Enable licensing. |
| — | `--disable` | flag | — | Disable licensing. |

### Examples

```bash
uip or licenses toggle a1b2c3d4-0000-0000-0000-000000000001 \
    --type Unattended --enable

uip or licenses toggle a1b2c3d4-0000-0000-0000-000000000001 \
    --type NonProduction --disable

uip or licenses toggle a1b2c3d4-0000-0000-0000-000000000001 \
    --type Unattended --enable --output-filter 'Data.Status'
```

### Data shape (--output json)

```json
{
  "Code": "LicenseToggle",
  "Data": {
    "MachineKey": "a1b2c3d4-0000-0000-0000-000000000001",
    "MachineName": "prod-worker-01",
    "RobotType": "Unattended",
    "Enabled": true,
    "Status": "Licensing enabled"
  }
}
```

## uip or licenses info

Show the tenant license summary: subscription plan, allowed vs used counts per robot type, expiration status, and licensed features. Use this to check overall capacity before allocating.

### Options

| Short | Long | Value | Default | Description |
|---|---|---|---|---|

### Examples

```bash
uip or licenses info
uip or licenses info --output-filter 'Data.Used'
uip or licenses info --output table
```

### Data shape (--output json)

```json
{
  "Code": "LicenseInfo",
  "Data": {
    "IsExpired": false,
    "SubscriptionPlan": "Enterprise",
    "Allowed": { "Unattended": 10, "Attended": 20 },
    "Used": { "Unattended": 4, "Attended": 7 },
    "LicensedFeatures": ["AISuite", "TestManager"]
  }
}
```

## Exit codes

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

## Related commands

- [`uip or machines`](./uip-or-machines.md) — manage machines and slot allocation.
- [`uip or users`](./uip-or-users.md) — `--license-type` on `users update`.

## See also

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