> This page is for Developer Documentation.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.benchling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.benchling.com/_mcp/server.

# Getting Information on Project Collaborators

## Overview

Access in Benchling is described by two objects: a **collaboration** grants a policy on a resource to a user, app, team, or organization, and a **group membership** puts a user in a team or organization. Answering "who can see this project?" means walking from one to the other.

This guide uses the [V3 REST API](/docs/v3-api-overview), where both objects are first-class listing endpoints with typed filters, to cover four use cases:

1. [Getting all collaborators on a specific project](#use-case-1)
2. [Getting information about collaborators on all projects on a tenant](#use-case-2)
3. [Getting a specific party's access policy on a specific project](#use-case-3)
4. [Getting a specific user's access policy for all projects they can access](#use-case-4)

> **Info**
>
> ### Why this recipe uses V3
>
> The V2 equivalents of these endpoints are `v2-alpha` and `v2-beta`, and answering these questions there takes a different endpoint for each direction: `?adminOf=`, `?memberOf=`, `?hasMembers=`, `?hasAdmins=`. V3 replaces all four with one `/group-membership/items` endpoint that filters by either side, so the same call shape works whichever way you are walking the graph. Use [V3](/docs/v3-api-overview) for this.

> **Info**
>
> The V3 collaboration, project, group membership, team, organization, and policy endpoints are beta. Set `early_access="true"` on the client, as in the examples below, or send the `EARLY-ACCESS: true` header on raw HTTP requests. See the [V3 Stability Guidelines](/docs/stability-guidelines).

Each use case shows the raw endpoint and response, then the same steps with the [V3 Python SDK](/docs/getting-started-with-the-v3-sdk). The Python examples use this client. Pass your tenant's root URL; the SDK adds `/api/v3` itself, and list calls page through `nextToken` for you.

```python
from benchling_v3_sdk import Benchling

benchling = Benchling(
    base_url="https://yourcompany.benchling.com",
    api_key="<your-api-key>",
    early_access="true",
)
```

## The three objects involved

| Object           | Endpoint                         | What it tells you                                         |
| ---------------- | -------------------------------- | --------------------------------------------------------- |
| Collaboration    | `/api/v3/collaboration/items`    | A policy is granted to a collaborator on a resource       |
| Group membership | `/api/v3/group-membership/items` | A user is a `MEMBER` or `ADMIN` of a team or organization |
| Policy           | `/api/v3/policy/{policy_id}`     | The permissions a policy actually grants                  |

A collaboration's `accessPolicy` is a reference, `{"__typename": "Policy", "id": "pol_…"}`, not the expanded policy. Fetch the policy separately when you need its statements, and cache it: a tenant has few policies and many collaborations.

## 1) Getting all collaborators on a specific project \[#use-case-1]

For a project ID such as `src_TnTw2xzy`, list its collaborations:

**`Endpoint`**

```text title="Endpoint"
GET /api/v3/project/src_TnTw2xzy/collaborations/items
```

**`Example Response`**

```json title="Example Response"
{
  "items": [
    {
      "__typename": "Collaboration",
      "id": "collab_8fKq2mXe",
      "accessPolicy": { "__typename": "Policy", "id": "pol_12345" },
      "collaboratorInfo": {
        "__typename": "PrincipalCollaboratorInfo",
        "collaborator": { "__typename": "User", "id": "ent_rCgpcKrj" }
      },
      "resource": { "__typename": "Project", "id": "src_TnTw2xzy" },
      "fromOwnership": true,
      "isAuditor": false,
      "createdAt": "2026-03-02T18:14:07.201933+00:00",
      "modifiedAt": "2026-03-02T18:14:07.201933+00:00"
    },
    {
      "__typename": "Collaboration",
      "id": "collab_L4wRt9Bn",
      "accessPolicy": { "__typename": "Policy", "id": "pol_23456" },
      "collaboratorInfo": {
        "__typename": "GroupCollaboratorInfo",
        "collaborator": {
          "__typename": "Team",
          "id": "team_oSrQDUmh",
          "name": "Benchling Team",
          "description": "Bench scientists on the Mars program",
          "organization": { "__typename": "Organization", "id": "org_2kFpWq" },
          "memberships": "https://{tenant_name}.benchling.com/api/v3/team/team_oSrQDUmh/memberships/items",
          "membersAreAdministratorsOfSchemas": false,
          "createdAt": "2026-01-15T11:19:58.004311+00:00",
          "modifiedAt": "2026-01-15T11:19:58.004311+00:00"
        },
        "role": "ADMIN"
      },
      "resource": { "__typename": "Project", "id": "src_TnTw2xzy" },
      "fromOwnership": false,
      "isAuditor": false,
      "createdAt": "2026-04-11T09:52:44.881204+00:00",
      "modifiedAt": "2026-04-11T09:52:44.881204+00:00"
    },
    {
      "__typename": "Collaboration",
      "id": "collab_Zc1yPd7K",
      "accessPolicy": { "__typename": "Policy", "id": "pol_23456" },
      "collaboratorInfo": {
        "__typename": "PrincipalCollaboratorInfo",
        "collaborator": { "__typename": "BenchlingApp", "id": "app_ROpiaHWZUrrZFUxy" }
      },
      "resource": { "__typename": "Project", "id": "src_TnTw2xzy" },
      "fromOwnership": false,
      "isAuditor": false,
      "createdAt": "2026-05-20T12:03:18.447712+00:00",
      "modifiedAt": "2026-05-20T12:03:18.447712+00:00"
    }
  ],
  "nextToken": ""
}
```

With the SDK, `benchling.project.list_collaborations("src_TnTw2xzy")` returns the same items.

Read `collaboratorInfo.__typename` (`collaborator_info.typename` in the SDK) to tell the two kinds of collaborator apart:

* `PrincipalCollaboratorInfo`: an individual user, app, or service principal. `collaborator` is a reference, `{__typename, id}`, and its `__typename` says which of the three you got.
* `GroupCollaboratorInfo`: a team or organization, plus a `role` of `MEMBER` or `ADMIN`. The role narrows the grant to a subgroup of that group: `ADMIN` means the policy applies only to the group's admins. Here `collaborator` is the fully hydrated group, not a reference, so you get its name and its `memberships` URI without a second call.

Two booleans qualify the grant. `isAuditor` marks a read-only auditor collaboration, and `fromOwnership` marks one that follows from ownership of the resource rather than from an explicit share, which is why the project owner appears in this list without anyone having added them.

This endpoint returns the same information as the project collaborators page in the UI.

![The Benchling project permissions page listing each collaborator alongside its access policy](/_fern-files/_img/25364a97c488db37f50ec802da77c9a22a19132f8e49b8e919a4f8f90a872da5.webp)

Every project object also carries a `collaborations` field holding the URI of this listing, so if you already have the project you do not need to build the URL.

### Expanding a group into individual users

To turn a team or organization collaborator into individual users, list that group's memberships. Filter by the group:

**`Endpoint`**

```text title="Endpoint"
GET /api/v3/group-membership/items?groupId.eq=team_oSrQDUmh
```

**`Example Response`**

```json title="Example Response"
{
  "items": [
    {
      "__typename": "GroupMembership",
      "id": "grpmem_Q7dLx2Vt",
      "group": {
        "__typename": "Team",
        "id": "team_oSrQDUmh",
        "name": "Benchling Team",
        "organization": { "__typename": "Organization", "id": "org_2kFpWq" }
      },
      "member": { "__typename": "User", "id": "ent_a8asdp" },
      "role": "ADMIN",
      "createdAt": "2026-01-15T11:20:02.118374+00:00",
      "modifiedAt": "2026-01-15T11:20:02.118374+00:00"
    }
  ],
  "nextToken": ""
}
```

Match each membership's `role` against the collaboration's `role`. A collaboration scoped to `ADMIN` applies only to memberships whose `role` is `ADMIN`; one scoped to `MEMBER` applies to everyone in the group. There is no `role` filter on the endpoint, so filter in your own code.

`GET /api/v3/team/{team_id}/memberships/items` and `GET /api/v3/organization/{organization_id}/memberships/items` return the same memberships as unpaginated nested lists, and each team and organization object carries the URI of its own listing in a `memberships` field.

Putting it together with the SDK, for every project the caller can see:

```python
results = []

for project in benchling.project.list(page_size=100):
    for collaboration in benchling.project.list_collaborations(project.id):
        info = collaboration.collaborator_info
        policy_id = collaboration.access_policy.id

        if info.typename == "PrincipalCollaboratorInfo":
            # A user, app, or service principal: record it directly
            results.append(
                {"project_id": project.id, "principal": info.collaborator, "policy_id": policy_id}
            )
            continue

        # A team or organization: expand it, keeping only the matching role
        group_id = info.collaborator.id
        for membership in benchling.group_membership.list(group_id_eq=group_id):
            if info.role == "ADMIN" and membership.role != "ADMIN":
                continue
            results.append(
                {"project_id": project.id, "principal": membership.member, "policy_id": policy_id}
            )
```

Branch on the `typename` string rather than the Python class of `info.collaborator` or `membership.group`: in SDK 9.0.2 a team can be deserialized into the `Organization` class, while its `typename` still reads `Team`.

> **Info**
>
> ### Collaborators with multiple access policies
>
> In this and every case below, one user can end up with more than one policy on a project: directly, and again through each group they belong to. See [Understanding Combined Access Policies](#understanding-combined-access-policies) for how to reduce them to an effective permission set.

## 2) Getting information about collaborators on all projects on a tenant \[#use-case-2]

List every project the caller can see, paging with `nextToken` until it comes back empty:

**`Endpoint`**

```text title="Endpoint"
GET /api/v3/project/items?pageSize=100
```

**`Example Response`**

```json title="Example Response"
{
  "items": [
    {
      "__typename": "Project",
      "id": "src_TnTw2xzy",
      "name": "Martian DNA Project",
      "owner": { "__typename": "User", "id": "ent_rCgpcKrj" },
      "archived": false,
      "archiveReason": null,
      "public": false,
      "collaborations": "https://{tenant_name}.benchling.com/api/v3/project/src_TnTw2xzy/collaborations/items",
      "createdAt": "2026-02-01T08:11:45.912004+00:00",
      "modifiedAt": "2026-08-19T14:37:22.663881+00:00"
    }
  ],
  "nextToken": "eyJ2YWx1ZSI6ICIyMDI2LTA4LTE5VDE0OjM3OjIyLjY2Mzg4MSJ9"
}
```

Then apply the logic from use case 1 to each project.

Alternatively, skip the per-project loop and list collaborations tenant-wide from `/api/v3/collaboration/items`, reading each collaboration's `resource` to see which project it belongs to. That is one paginated sweep instead of one request per project, which matters on a tenant with many projects.

## 3) Getting a specific party's access policy on a specific project \[#use-case-3]

Filter collaborations by both sides at once. `collaboratorId.anyOf` takes the party's ID and `resourceId.anyOf` takes the project's:

**`Endpoint`**

```text title="Endpoint"
GET /api/v3/collaboration/items?resourceId.anyOf=src_TnTw2xzy&collaboratorId.anyOf=team_oSrQDUmh
```

Both filters accept a comma-separated list of up to 100 IDs, so you can ask about several parties or several projects in one request. In the SDK, pass a string or a list:

```python
direct = list(
    benchling.collaboration.list(
        resource_id_any_of="src_TnTw2xzy",
        collaborator_id_any_of=["team_oSrQDUmh"],
    )
)
print([collaboration.access_policy.id for collaboration in direct])
```

That covers a party granted access directly. A user can also reach the project through a group, which the filter above will not show, so also list the user's groups and re-run the filter with those IDs:

**`Endpoint`**

```text title="Endpoint"
GET /api/v3/group-membership/items?memberId.eq=ent_a8asdp
```

Collect the `group.id` values, then query `collaboratorId.anyOf=<group_id>,<group_id>,…` against the same project, remembering to drop any collaboration whose `role` is `ADMIN` where the user's membership role is only `MEMBER`.

## 4) Getting a specific user's access policy for all projects they can access \[#use-case-4]

This is use case 3 without the project filter, and it shows why one endpoint filtering both directions is easier to work with than four.

> **Info**
>
> ### Listing endpoint visibility
>
> Listing endpoints return only what the API caller can see. This use case therefore returns projects accessible to both the target user and the caller, not everything the target user can access.

1. Find the groups the user belongs to, and keep each membership's `role`:

   **`Endpoint`**

   ```text title="Endpoint"
   GET /api/v3/group-membership/items?memberId.eq=ent_a8asdp
   ```

2. List every collaboration granted to the user or to any of those groups, in one request:

   **`Endpoint`**

   ```text title="Endpoint"
   GET /api/v3/collaboration/items?collaboratorId.anyOf=ent_a8asdp,team_oSrQDUmh,org_2kFpWq
   ```

   `collaboratorId.anyOf` caps at 100 IDs, so a user in more than 99 groups needs the list split across requests, as the code below does.

3. Discard group collaborations whose `role` the user does not hold, then group what remains by `resource.id`:

```python
from collections import defaultdict

memberships = {
    m.group.id: m.role
    for m in benchling.group_membership.list(member_id_eq="ent_a8asdp")
}

collaborator_ids = ["ent_a8asdp", *memberships]
policies_by_project = defaultdict(set)

# collaboratorId.anyOf accepts at most 100 IDs per request
for start in range(0, len(collaborator_ids), 100):
    batch = collaborator_ids[start : start + 100]
    for collaboration in benchling.collaboration.list(collaborator_id_any_of=batch):
        info = collaboration.collaborator_info

        if info.typename == "GroupCollaboratorInfo":
            held_role = memberships[info.collaborator.id]
            # A grant scoped to a group's admins does not apply to plain members
            if info.role == "ADMIN" and held_role != "ADMIN":
                continue

        policies_by_project[collaboration.resource.id].add(collaboration.access_policy.id)
```

Each entry in `policies_by_project` is a project the user can reach, paired with every policy that gets them there. Reduce those to one effective permission set as follows.

## Understanding Combined Access Policies

A user with more than one policy on a project holds the union of what those policies grant. Fetch each one to see its statements:

**`Endpoint`**

```text title="Endpoint"
GET /api/v3/policy/pol_12345
```

**`Example Response`**

```json title="Example Response"
{
  "__typename": "Policy",
  "id": "pol_12345",
  "name": "LIBRARIAN",
  "description": "Read access plus folder creation for authored items",
  "policyType": "DATA_POLICY",
  "policyStatements": [
    {
      "__typename": "PolicyStatement",
      "itemType": "FOLDER_OR_PROJECT",
      "action": "READ",
      "condition": "ALWAYS"
    },
    {
      "__typename": "PolicyStatement",
      "itemType": "FOLDER_OR_PROJECT",
      "action": "CREATE_SUBFOLDER",
      "condition": "IS_AUTHOR"
    },
    {
      "__typename": "PolicyStatement",
      "itemType": "NOTEBOOK",
      "action": "READ",
      "condition": "ALWAYS"
    }
  ],
  "createdAt": "2025-11-04T16:44:19.330912+00:00",
  "modifiedAt": "2026-06-30T10:15:51.772480+00:00"
}
```

A V3 policy statement is a triple:

* `itemType`: the kind of object the grant covers, such as `FOLDER_OR_PROJECT`, `NOTEBOOK`, or `CONTAINER`. Folders and projects share one item type.
* `action`: the operation, such as `READ`, `WRITE`, `ADMIN`, or `CREATE_SUBFOLDER`.
* `condition`: when the grant applies: `ALWAYS`, `IS_AUTHOR`, or `IS_ASSIGNEE`.

All three enums are long and all three include `UNKNOWN`, which is what you receive for a value your client's version of the spec does not know about. Treat `UNKNOWN` as a value to skip rather than an error, so a new permission type does not break your code.

> **Note**
>
> V3 policies list only what they grant. Where a V2 policy carried a statement per permission with an `access` of `GRANTED`, `GRANTED_TO_AUTHOR`, or `NOT_GRANTED`, a V3 policy simply omits permissions it does not grant. Absence means not granted.

With the SDK, fetch each distinct policy once with `benchling.policy.get`, then combine them separately for each project.

To combine policies, key statements by `(itemType, action)` and keep the least restrictive `condition`. `ALWAYS` beats `IS_AUTHOR` and `IS_ASSIGNEE`. `IS_AUTHOR` and `IS_ASSIGNEE` are different conditions rather than stronger and weaker versions of one, so a user holding both keeps both. A pair absent from every policy is not granted at all.

```python
from collections import defaultdict

# Fetch each policy once, however many projects use it
policy_ids = {pid for pids in policies_by_project.values() for pid in pids}
policies = {policy_id: benchling.policy.get(policy_id) for policy_id in policy_ids}

effective_by_project = {}
for project_id, project_policy_ids in policies_by_project.items():
    conditions = defaultdict(set)
    for policy_id in project_policy_ids:
        for statement in policies[policy_id].policy_statements:
            if "UNKNOWN" in (statement.item_type, statement.action, statement.condition):
                continue
            key = (statement.item_type, statement.action)
            conditions[key].add(statement.condition)

    effective_by_project[project_id] = [
        {
            "itemType": item_type,
            "action": action,
            "conditions": ["ALWAYS"] if "ALWAYS" in found else sorted(found),
        }
        for (item_type, action), found in conditions.items()
    ]
```

This is a per-project calculation: a policy the user holds on one project says nothing about their access to another, so each project's statements are combined only with that project's policies.

For example, a user holding both a `LIBRARIAN` policy that grants `FOLDER_OR_PROJECT` / `CREATE_SUBFOLDER` with `condition: IS_AUTHOR` and a `SCIENTIST` policy that grants the same pair with `condition: ALWAYS` can create subfolders anywhere in the project, because `ALWAYS` supersedes `IS_AUTHOR`. Any pair neither policy mentions stays ungranted.