---
question: How do I give the same access to several people at once?
kind: task
via_web: available
via_cli: available
via_python: na
via_api: available
via_config: na
ref_web: Roles & permissions › Groups
ref_cli: abi iam group bind
ref_api: POST /api/iam/admin/groups
prereq: You are an owner or admin of the workspace or organization, or the platform admin. Identity provider group claims are the platform admin's.
next:
  - /capabilities/platform/give-someone-access
  - /capabilities/platform/create-a-policy
---

# Manage groups

A group is a set of people. What is attached to a group reaches each member, and a member who leaves loses it. A group belongs to the level it is created at: a workspace's or an organization's group takes only people of that organization, and receives attachments at its level or below it. Platform groups take anyone, service accounts included.

Every organization and workspace already has two groups that Nexus keeps in step with its roles: "&lt;level&gt; members" and "&lt;level&gt; admins". Nexus resets their members on each role change, so add people to them by giving a role, not by hand.

## Web UI

### Open Groups

Open **Roles & permissions** at the level, then **Groups**. The table shows each group's **Name**, **Id**, **Owner** and **Members**. A group owned above this level is listed so you can attach to it, but it is changed only at its owner.

### Create a group

Type a **New group name** and choose **Create group**. It is owned by this level.

### Add and remove members

Select the group's name to open its page. Under **Members**, pick a person, or type an id, and choose **Add member**. Adding a member gives them what the group holds, so IAM refuses it when you do not hold that yourself. Select **Remove** beside a member to take them out.

### Attach policies to the group

**Policies, at every level** lists what is attached to the group and where. Use the attach form under it as for a person: pick the **Policy**, then **Attach policy**. **Detach** removes one.

### Map identity provider groups (platform)

On a platform group's page, **IdP group claims** lists the identity provider groups mapped to it: "People whose identity provider sends one of these group claims join this group when they sign in." Pick the **Identity provider**, type the **Value of the group claim**, and choose **Map group**. **Remove** unmaps one. A member through a claim stays one for as long as their sign-in token lasts, ten minutes at most, and is checked again at the next one.

### Delete a group

Choose **Delete** on its row, then **Delete group**. Its members lose what it gave them.

## CLI

The CLI binds an identity provider's group to a role: its members get that role at an organization or a workspace when they sign in. It does not create groups or add members by hand: use the Web UI for that.

### Bind a provider's group to a role

```bash
abi iam group bind northwind "Data readers" --role viewer --workspace <ws-id> --org <org-id>
```

`northwind` is the identity provider's name in the configuration, `"Data readers"` the value its groups claim sends. Without `--workspace`, the role is the organization's own (`--org`). IAM creates the group `idp:<provider>:<group>`, owned by the organization, maps the claim to it and attaches the role. `--role` is `owner`, `admin`, `member` or `viewer`; `viewer` is a workspace role only, since an organization has no viewers.

### List and unbind

```bash
abi iam group list --provider northwind
abi iam group unbind northwind "Data readers" --role viewer --workspace <ws-id> --org <org-id>
```

`unbind` takes the role away at that level only. The commands run as the engine, from the project, so they need its configuration and no Nexus sign-in. See [`abi iam group`](/user-guide/reference/cli#abi-iam-group).

## Python

Not applicable. The SDK does not manage groups. Use the Web UI, the CLI or the REST API.

## REST API

:::warning Session only
The routes under `/api/iam/admin/` take a signed-in session only. A personal API key (`abi_pk_…`) is refused with 403 on `/api/iam/`, so a script that holds one cannot manage groups.
:::

### Create a group

```http
POST /api/iam/admin/groups
Content-Type: application/json

{"name": "Forecasting analysts", "scope": "abi:nexus:organization/<org>/nexus:workspace/<ws>"}
```

Without `scope`, the group is the platform's. `GET /api/iam/admin/groups?scope=` lists a level's groups.

### Members and claims

- `PUT /api/iam/admin/groups/{id}/members/{member}` adds a member, `DELETE` removes one.
- `PUT /api/iam/admin/groups/{id}/idp-mappings` with `{"provider": "northwind", "claim_value": "Data readers"}` maps a claim; `DELETE /api/iam/admin/groups/{id}/idp-mappings?provider=northwind&claim_value=Data%20readers` unmaps it.
- `DELETE /api/iam/admin/groups/{id}` deletes the group.

Attach a policy to a group with `POST /api/iam/admin/attachments`, as for a person.

## Config

Not applicable. Groups live in IAM, not in `config.yaml`. The identity provider's claim that carries groups is part of its provider configuration.
