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, where both objects are first-class listing endpoints with typed filters, to cover four use cases:
- Getting all collaborators on a specific project
- Getting information about collaborators on all projects on a tenant
- Getting a specific party’s access policy on a specific project
- Getting a specific user’s access policy for all projects they can access
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 for this.
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.
Each use case shows the raw endpoint and response, then the same steps with the V3 Python 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.
The three objects involved
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
For a project ID such as src_TnTw2xzy, list its collaborations:
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.collaboratoris a reference,{__typename, id}, and its__typenamesays which of the three you got.GroupCollaboratorInfo: a team or organization, plus aroleofMEMBERorADMIN. The role narrows the grant to a subgroup of that group:ADMINmeans the policy applies only to the group’s admins. Herecollaboratoris the fully hydrated group, not a reference, so you get its name and itsmembershipsURI 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.

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:
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:
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.
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 for how to reduce them to an effective permission set.
2) Getting information about collaborators on all projects on a tenant
List every project the caller can see, paging with nextToken until it comes back empty:
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
Filter collaborations by both sides at once. collaboratorId.anyOf takes the party’s ID and resourceId.anyOf takes the project’s:
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:
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:
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
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.
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.
-
Find the groups the user belongs to, and keep each membership’s
role:Endpoint -
List every collaboration granted to the user or to any of those groups, in one request:
EndpointcollaboratorId.anyOfcaps at 100 IDs, so a user in more than 99 groups needs the list split across requests, as the code below does. -
Discard group collaborations whose
rolethe user does not hold, then group what remains byresource.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:
A V3 policy statement is a triple:
itemType: the kind of object the grant covers, such asFOLDER_OR_PROJECT,NOTEBOOK, orCONTAINER. Folders and projects share one item type.action: the operation, such asREAD,WRITE,ADMIN, orCREATE_SUBFOLDER.condition: when the grant applies:ALWAYS,IS_AUTHOR, orIS_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.
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.
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.