opschain admin groups delete
Included from Basic tier
Deletes a local group and all its memberships: delete <group> (the v2
GroupService.DeleteGroup verb). The delete is refused
while policy assignments reference the group name:
the server's named refusal lists the assigned policies
so you know exactly what to remove first (admin authz policies assignments manages
assignments). Only an assignment-free group deletes; an unknown name is
not_found.
opschain admin groups delete platform-admins
Error: local group "platform-admins" cannot be deleted: 1 policy assignment(s) reference it (Superuser policy) — remove those assignments first
opschain admin groups delete retired-team
Deleted local group retired-team
Deleting a directory-named local group removes only the local memberships and the local group row — the directory's own group is untouched, and a directory principal's mirror groups keep resolving.
Flags
| Flag | Meaning |
|---|---|
--server <url> | Server base URL (default: the active context / OPSCHAIN_SERVER). |
--auth-token <token> | Admin bearer token override (default: your opschain login session, then $OPSCHAIN_ADMIN_TOKEN, then the token stored by opschain admin login). |
Exit codes: 0 on success, 1 when the server refused (policy assignments
exist, unknown group) or the token is rejected, 2 for usage — wrong
argument count, or the connection errors on opschain docs cli/admin-users.
See also
opschain docs cli/admin-groups-create— the inverse.opschain docs cli/admin-authz-policies-assignments— removing the blocking assignments.