# List Collaborations — Box

> Lists the collaborations (users and groups with access, and their roles) on a Box file or folder. Use this to find a collaboration ID before calling Delete Collaboration, or to audit who has access to an item. Item Type must be file or…

- Key: `box-list-collaborations`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Box (`box`) — https://pipedream.com/apps/box.md
- This page (HTML): https://pipedream.com/apps/box/actions/list-collaborations
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/box/actions/list-collaborations/list-collaborations.mjs

## Description

Lists the collaborations (users and groups with access, and their roles) on a Box file or folder. Use this to find a collaboration ID before calling **Delete Collaboration**, or to audit who has access to an item. Item Type must be `file` or `folder`. [See the documentation](https://developer.box.com/reference/get-files-id-collaborations/).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `itemType` | `string` | Yes | The type of Box item. Valid values: file or folder. |
| `folderId` | `string` | Yes | The folder to list collaborations for when Item Type is folder. When Item Type is file, use this as the parent folder ID to scope available file IDs. Use 0 for the root folder. Use the List Folders action to retrieve folder IDs. Options are loaded from the connected account. |
| `fileId` | `string` | No | The file to list collaborations for (e.g. 123456789). Required when Item Type is file. Use the List Folder Items action to retrieve file IDs. Options are loaded from the connected account. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "box",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "box-list-collaborations",
  arguments: {
    itemType: "Item Type",
    folderId: "Folder",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "box-list-collaborations",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    box: { authProvisionId: "apn_xxxxxxx" },
    itemType: "Item Type",
    folderId: "Folder",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "box-list-collaborations",
    "configured_props": {
      "box": { "authProvisionId": "apn_xxxxxxx" },
      "itemType": "Item Type",
      "folderId": "Folder"
    }
  }'
```

---

- App: https://pipedream.com/apps/box.md · All apps: https://pipedream.com/apps
