service-accounts
orc service-accounts creates machine-authentication principals bound to a Workspace, inspects and updates their roles and status, and issues API keys. Suspending an account disables its existing keys; you can activate it again later.
The CLI manages only Workspace-bound service accounts. Creating, updating, and issuing keys requires project:update permission. Before issuing a key, prepare a new output file outside source control.
Usage
orc service-accounts list --workspace WORKSPACE_ID --jsonList service accounts.
Subcommands
list
Lists IDs, roles, status, and Workspace IDs. Use --limit and --cursor for pagination.
orc service-accounts list [options]create
Creates a Workspace-scoped service account with a name. The CLI supports only --scope workspace and rejects --scope organization.
orc service-accounts create [options]Unique options
--idempotency-key
Retry identity for operations that support idempotency. Use a unique key for each new operation, and reuse it only when retrying the same HTTP method, path, query values and exact request body. JSON whitespace changes can count as a different body. Keys contain 1–255 characters after trimming and expire after 24 hours. A completed JSON response is replayed without repeating the operation. A different request using the same key returns 409 idempotency_error. An in-progress request returns 409 idempotency_in_progress with Retry-After: 2. Whether this header is required depends on the operation.
Type: string. Optional.
orc service-accounts create --idempotency-key <value>--name
(required) Display name for the service account.
Type: string. Optional.
orc service-accounts create --name <value>--scope
Credential binding scope. Organization scope creates a service account without a Workspace binding.; enum: workspace|organization
Type: string. Optional.
orc service-accounts create --scope <value>--workspace-id
Optional explicit Workspace binding. Omit for the current Workspace; use null with organization scope.; (use "null" or "reset" to clear)
Type: string. Optional.
orc service-accounts create --workspace-id <value>get
Retrieves current information for a service account ID. Run it with the target Workspace selected.
orc service-accounts get <id> [options]update
Updates the name or status. status is active, suspended, or deleted. suspended disables existing keys until the account returns to active. deleted is permanent.
orc service-accounts update <id> [options]Unique options
--name
Updated display name.
Type: string. Optional.
orc service-accounts update <id> --name <value>--status
active — normal operation.suspended — all keys disabled, can be reactivated.deleted — permanent removal, all keys revoked.; enum: active|suspended|deleted
Type: string. Optional.
orc service-accounts update <id> --status <value>keys create
Issues a key using the service account ID, key name, permissions, and a new --output destination. The key is returned once and saved to an owner-only file. Existing files are not overwritten.
orc service-accounts keys create <id> [options]Unique options
--idempotency-key
Retry identity for operations that support idempotency. Use a unique key for each new operation, and reuse it only when retrying the same HTTP method, path, query values and exact request body. JSON whitespace changes can count as a different body. Keys contain 1–255 characters after trimming and expire after 24 hours. A completed JSON response is replayed without repeating the operation. A different request using the same key returns 409 idempotency_error. An in-progress request returns 409 idempotency_in_progress with Retry-After: 2. Whether this header is required depends on the operation.
Type: string. Optional.
orc service-accounts keys create <id> --idempotency-key <value>--name
(required) Required display name for the key.
Type: string. Optional.
orc service-accounts keys create <id> --name <value>--permissions
Endpoint-group permission map. Each key is an endpoint group name,
value is the access level. Unspecified groups default to none.; (JSON object, e.g. '{"custom_id":"x"}')
Type: string. Optional.
orc service-accounts keys create <id> --permissions <value>Examples
Create a Workspace service account.
orc service-accounts create --workspace WORKSPACE_ID --name "CI bot" --scope workspace --jsonCreate a Workspace service account.
Suspend a service account.
orc service-accounts update SERVICE_ACCOUNT_ID --workspace WORKSPACE_ID --status suspended --jsonSuspend a service account.
Save a read key to a private file.
orc service-accounts keys create SERVICE_ACCOUNT_ID --workspace WORKSPACE_ID --name "CI read key" --permissions '{"answers":"read"}' --output /secure/path/service-account-key --jsonSave a read key to a private file.
Revoke an unused key.
orc api-keys delete API_KEY_ID --workspace WORKSPACE_ID --yes --jsonRevoke an unused key.
Managing issued keys
The CLI does not print the key to standard output or standard error. Do not paste the secret into logs, chat, Issues, or source code. Use the key ID in normal output and service_account_id in orc api-keys list to identify the key, then revoke unused keys with orc api-keys delete.
Global Options
The following global options can be used with orc service-accounts:
For details and examples, see global options.