---
updatedAt: 2026-04-30T12:26:37.000Z
agentTools:
  projectIndex: https://docs.beemdata.com/llms.txt
---

# listWorkspaceUsersByUser

# List workspace users by user

**GraphQL operation type:** `query` &nbsp;·&nbsp; **Field:** `listWorkspaceUsersByUser`

# OpenAPI definition

````json
{
  "openapi": "3.0.3",
  "info": {
    "title": "BEEM Public API",
    "version": "1.0.0",
    "description": "BEEM's GraphQL API, exposed as an OpenAPI reference for documentation purposes.\n\n## How this is structured\n\nBEEM exposes a single GraphQL endpoint at `/graphql`. Every entry in this reference is a distinct GraphQL operation — either a query (read) or a mutation (write) — and each entry is documented as if it were its own endpoint to make browsing easier.\n\nOn the wire, every request is `POST /graphql` with a JSON body of the form:\n\n```json\n{\n  \"query\": \"query GetWorkspace($id: ID!) { getWorkspace(id: $id) { id name } }\",\n  \"operationName\": \"GetWorkspace\",\n  \"variables\": { \"id\": \"...\" }\n}\n```\n\nEach operation in this reference comes with the canonical `query` string pre-filled — you only need to supply `variables`.\n\n### A note on URLs\n\nEvery operation in this reference is documented at a path like `/graphql/<kind>/<name>` (for example, `POST /graphql/query/getDataset`). This is purely for browsing — readme.io requires a unique path per operation to render them as separate entries. **On the wire, every request is sent to `POST /graphql`**; the operation discriminator lives in the request body, not the URL. Our edge layer rewrites `/graphql/*` to `/graphql` before forwarding to the API, so the URLs as shown will work — both with the *Try It* panel and with the bundled cURL/JavaScript/Python samples.\n\n## Authentication\n\nBEEM accepts two authentication schemes:\n\n- **OAuth 2.0** (recommended). Click *Authorize* in the *Try It* panel and sign in with your   BEEM account. The resulting access token is attached to subsequent requests automatically.\n- **Bearer token** (legacy / development): paste a JWT obtained out of band — for example from your browser's   network tab while signed into the BEEM web app.\n\nBoth schemes resolve to the same identity model, so the resulting permissions are identical.\n\n## Errors\n\nNote that the API returns HTTP 200 even for failed operations — always inspect the `errors` array in the response body. HTTP 401 indicates a malformed or expired token; HTTP 403 indicates the request never reached the resolver. Authorization failures inside a resolver come back as 200 with a populated `errors` array.",
    "contact": {
      "name": "BEEM Support",
      "url": "https://beemhq.com"
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-languages": [
      "curl",
      "javascript",
      "python"
    ],
    "oauth-options": {
      "usePkce": true
    }
  },
  "servers": [
    {
      "url": "https://api.beemdata.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Memberships"
    }
  ],
  "security": [
    {
      "oauth2": []
    },
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/graphql/query/listWorkspaceUsersByUser": {
      "post": {
        "operationId": "query_listWorkspaceUsersByUser",
        "summary": "listWorkspaceUsersByUser",
        "description": "# List workspace users by user\n\n**GraphQL operation type:** `query` &nbsp;·&nbsp; **Field:** `listWorkspaceUsersByUser`",
        "tags": [
          "Memberships"
        ],
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "name": "cURL",
              "code": "curl -X POST https://api.beemdata.com/graphql \\\n  -H 'Content-Type: application/json' \\\n  -H 'Authorization: Bearer YOUR_ID_TOKEN' \\\n  -d \"{\\n  \\\"query\\\": \\\"query ListWorkspaceUsersByUser($filter: ModelWorkspaceUserFilterInput, $limit: Int, $nextToken: String, $sortDirection: ModelSortDirection, $userId: ID, $workspaceId: ModelIDKeyConditionInput) {\\\\n  listWorkspaceUsersByUser(filter: $filter, limit: $limit, nextToken: $nextToken, sortDirection: $sortDirection, userId: $userId, workspaceId: $workspaceId) { items { createdAt id organizationId role updatedAt user { createdAt email firstName id lastName updatedAt } userId workspace { createdAt id name organization { id name } organizationId seq updatedAt } workspaceId } nextToken }\\\\n}\\\",\\n  \\\"operationName\\\": \\\"ListWorkspaceUsersByUser\\\",\\n  \\\"variables\\\": {\\n    \\\"filter\\\": \\\"<filter>\\\",\\n    \\\"limit\\\": \\\"<limit>\\\",\\n    \\\"nextToken\\\": \\\"<nextToken>\\\",\\n    \\\"sortDirection\\\": \\\"<sortDirection>\\\",\\n    \\\"userId\\\": \\\"<userId>\\\",\\n    \\\"workspaceId\\\": \\\"<workspaceId>\\\"\\n  }\\n}\""
            },
            {
              "language": "javascript",
              "name": "JavaScript",
              "code": "const res = await fetch('https://api.beemdata.com/graphql', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'Authorization': `Bearer ${idToken}`,\n  },\n  body: JSON.stringify({\n  \"query\": \"query ListWorkspaceUsersByUser($filter: ModelWorkspaceUserFilterInput, $limit: Int, $nextToken: String, $sortDirection: ModelSortDirection, $userId: ID, $workspaceId: ModelIDKeyConditionInput) {\\n  listWorkspaceUsersByUser(filter: $filter, limit: $limit, nextToken: $nextToken, sortDirection: $sortDirection, userId: $userId, workspaceId: $workspaceId) { items { createdAt id organizationId role updatedAt user { createdAt email firstName id lastName updatedAt } userId workspace { createdAt id name organization { id name } organizationId seq updatedAt } workspaceId } nextToken }\\n}\",\n  \"operationName\": \"ListWorkspaceUsersByUser\",\n  \"variables\": {\n    \"filter\": \"<filter>\",\n    \"limit\": \"<limit>\",\n    \"nextToken\": \"<nextToken>\",\n    \"sortDirection\": \"<sortDirection>\",\n    \"userId\": \"<userId>\",\n    \"workspaceId\": \"<workspaceId>\"\n  }\n})\n});\nconst { data, errors } = await res.json();"
            },
            {
              "language": "python",
              "name": "Python",
              "code": "import requests\n\nres = requests.post(\n    'https://api.beemdata.com/graphql',\n    headers={\n        'Content-Type': 'application/json',\n        'Authorization': f'Bearer {id_token}',\n    },\n    json={\n    \"query\": \"query ListWorkspaceUsersByUser($filter: ModelWorkspaceUserFilterInput, $limit: Int, $nextToken: String, $sortDirection: ModelSortDirection, $userId: ID, $workspaceId: ModelIDKeyConditionInput) {\\n  listWorkspaceUsersByUser(filter: $filter, limit: $limit, nextToken: $nextToken, sortDirection: $sortDirection, userId: $userId, workspaceId: $workspaceId) { items { createdAt id organizationId role updatedAt user { createdAt email firstName id lastName updatedAt } userId workspace { createdAt id name organization { id name } organizationId seq updatedAt } workspaceId } nextToken }\\n}\",\n    \"operationName\": \"ListWorkspaceUsersByUser\",\n    \"variables\": {\n        \"filter\": \"<filter>\",\n        \"limit\": \"<limit>\",\n        \"nextToken\": \"<nextToken>\",\n        \"sortDirection\": \"<sortDirection>\",\n        \"userId\": \"<userId>\",\n        \"workspaceId\": \"<workspaceId>\"\n    }\n}\n)\npayload = res.json()"
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "GraphQL operation document. Pre-filled with the canonical query for this operation; you may edit it (e.g. to trim the selection set).",
                    "default": "query ListWorkspaceUsersByUser($filter: ModelWorkspaceUserFilterInput, $limit: Int, $nextToken: String, $sortDirection: ModelSortDirection, $userId: ID, $workspaceId: ModelIDKeyConditionInput) {\n  listWorkspaceUsersByUser(filter: $filter, limit: $limit, nextToken: $nextToken, sortDirection: $sortDirection, userId: $userId, workspaceId: $workspaceId) { items { createdAt id organizationId role updatedAt user { createdAt email firstName id lastName updatedAt } userId workspace { createdAt id name organization { id name } organizationId seq updatedAt } workspaceId } nextToken }\n}"
                  },
                  "operationName": {
                    "type": "string",
                    "description": "Name of the operation in `query` to execute.",
                    "default": "ListWorkspaceUsersByUser"
                  },
                  "variables": {
                    "type": "object",
                    "properties": {
                      "filter": {
                        "$ref": "#/components/schemas/ModelWorkspaceUserFilterInput"
                      },
                      "limit": {
                        "type": "integer",
                        "format": "int32"
                      },
                      "nextToken": {
                        "type": "string"
                      },
                      "sortDirection": {
                        "$ref": "#/components/schemas/ModelSortDirection"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "workspaceId": {
                        "$ref": "#/components/schemas/ModelIDKeyConditionInput"
                      }
                    }
                  }
                }
              },
              "example": {
                "query": "query ListWorkspaceUsersByUser($filter: ModelWorkspaceUserFilterInput, $limit: Int, $nextToken: String, $sortDirection: ModelSortDirection, $userId: ID, $workspaceId: ModelIDKeyConditionInput) {\n  listWorkspaceUsersByUser(filter: $filter, limit: $limit, nextToken: $nextToken, sortDirection: $sortDirection, userId: $userId, workspaceId: $workspaceId) { items { createdAt id organizationId role updatedAt user { createdAt email firstName id lastName updatedAt } userId workspace { createdAt id name organization { id name } organizationId seq updatedAt } workspaceId } nextToken }\n}",
                "operationName": "ListWorkspaceUsersByUser",
                "variables": {
                  "filter": "<filter>",
                  "limit": "<limit>",
                  "nextToken": "<nextToken>",
                  "sortDirection": "<sortDirection>",
                  "userId": "<userId>",
                  "workspaceId": "<workspaceId>"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "GraphQL response. A 200 status does not imply success — check the `errors` array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "listWorkspaceUsersByUser": {
                          "$ref": "#/components/schemas/ModelWorkspaceUserConnection"
                        }
                      },
                      "nullable": true
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GraphQLError"
                      },
                      "description": "Present if the operation produced one or more errors. May coexist with a partial `data` payload."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not authorized for this operation or resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForbiddenError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "Sign in with your BEEM account.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://auth0.app.beemdata.com/authorize?audience=https%3A%2F%2Fapi.beemdata.com",
            "tokenUrl": "https://auth0.app.beemdata.com/oauth/token",
            "refreshUrl": "https://auth0.app.beemdata.com/oauth/token",
            "scopes": {
              "openid": "Issue an ID token identifying the signed-in user.",
              "email": "Include the user's email address in the token.",
              "profile": "Include the user's profile attributes in the token.",
              "offline_access": "Issue a refresh token alongside the access token."
            }
          }
        }
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Paste a JWT obtained out of band (e.g. from your browser's network tab while signed into the BEEM web app)."
      }
    },
    "schemas": {
      "ForbiddenError": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GraphQLError"
            }
          }
        },
        "example": {
          "errors": [
            {
              "errorType": "Unauthorized",
              "message": "Not Authorized to access $field on type $Type"
            }
          ]
        }
      },
      "GraphQLError": {
        "type": "object",
        "description": "GraphQL-style error object. AppSync attaches a non-empty `errors` array whenever an operation fails or is partially fulfilled.",
        "properties": {
          "message": {
            "type": "string"
          },
          "path": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            }
          },
          "locations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "line": {
                  "type": "integer"
                },
                "column": {
                  "type": "integer"
                }
              }
            }
          },
          "errorType": {
            "type": "string",
            "description": "AppSync error category (e.g. `Unauthorized`, `DynamoDB:ConditionalCheckFailedException`)."
          },
          "errorInfo": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "ModelAttributeTypes": {
        "type": "string",
        "enum": [
          "_null",
          "binary",
          "binarySet",
          "bool",
          "list",
          "map",
          "number",
          "numberSet",
          "string",
          "stringSet"
        ],
        "description": "GraphQL enum ModelAttributeTypes"
      },
      "ModelIDInput": {
        "type": "object",
        "properties": {
          "attributeExists": {
            "type": "boolean"
          },
          "attributeType": {
            "$ref": "#/components/schemas/ModelAttributeTypes"
          },
          "beginsWith": {
            "type": "string"
          },
          "between": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contains": {
            "type": "string"
          },
          "eq": {
            "type": "string"
          },
          "ge": {
            "type": "string"
          },
          "gt": {
            "type": "string"
          },
          "le": {
            "type": "string"
          },
          "lt": {
            "type": "string"
          },
          "ne": {
            "type": "string"
          },
          "notContains": {
            "type": "string"
          },
          "size": {
            "$ref": "#/components/schemas/ModelSizeInput"
          }
        },
        "additionalProperties": false
      },
      "ModelIDKeyConditionInput": {
        "type": "object",
        "properties": {
          "beginsWith": {
            "type": "string"
          },
          "between": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "eq": {
            "type": "string"
          },
          "ge": {
            "type": "string"
          },
          "gt": {
            "type": "string"
          },
          "le": {
            "type": "string"
          },
          "lt": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ModelSizeInput": {
        "type": "object",
        "properties": {
          "between": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "eq": {
            "type": "integer",
            "format": "int32"
          },
          "ge": {
            "type": "integer",
            "format": "int32"
          },
          "gt": {
            "type": "integer",
            "format": "int32"
          },
          "le": {
            "type": "integer",
            "format": "int32"
          },
          "lt": {
            "type": "integer",
            "format": "int32"
          },
          "ne": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "ModelSortDirection": {
        "type": "string",
        "enum": [
          "ASC",
          "DESC"
        ],
        "description": "GraphQL enum ModelSortDirection"
      },
      "ModelUserRoleInput": {
        "type": "object",
        "properties": {
          "eq": {
            "$ref": "#/components/schemas/UserRole"
          },
          "ne": {
            "$ref": "#/components/schemas/UserRole"
          }
        },
        "additionalProperties": false
      },
      "ModelWorkspaceUserConnection": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceUser"
            }
          },
          "nextToken": {
            "type": "string"
          }
        },
        "required": [
          "items"
        ]
      },
      "ModelWorkspaceUserFilterInput": {
        "type": "object",
        "properties": {
          "and": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelWorkspaceUserFilterInput"
            }
          },
          "id": {
            "$ref": "#/components/schemas/ModelIDInput"
          },
          "not": {
            "type": "object",
            "additionalProperties": true,
            "description": "Self-reference to ModelWorkspaceUserFilterInput. Same shape as the parent object — collapsed here for documentation rendering."
          },
          "or": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelWorkspaceUserFilterInput"
            }
          },
          "organizationId": {
            "$ref": "#/components/schemas/ModelIDInput"
          },
          "role": {
            "$ref": "#/components/schemas/ModelUserRoleInput"
          },
          "userId": {
            "$ref": "#/components/schemas/ModelIDInput"
          },
          "workspaceId": {
            "$ref": "#/components/schemas/ModelIDInput"
          }
        },
        "additionalProperties": false
      },
      "Organization": {
        "type": "object",
        "properties": {
          "billing_provider": {
            "type": "string"
          },
          "cloudResourceId": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "connectionLimit": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp (e.g. 2026-04-29T12:34:56.000Z)"
          },
          "dataAccountNumber": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "maintenanceWindow": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "pipelineAccountNumber": {
            "type": "string"
          },
          "s3BucketName": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp (e.g. 2026-04-29T12:34:56.000Z)"
          },
          "warehouseRetention": {
            "type": "integer",
            "format": "int32"
          },
          "wholeSourceConfig": {
            "description": "Arbitrary JSON value, serialized as a string when sent over the wire."
          },
          "wholeSourceConfigVersion": {
            "type": "integer",
            "format": "int32"
          },
          "workspaceLimit": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "cloudResourceId",
          "color",
          "createdAt",
          "dataAccountNumber",
          "id",
          "name",
          "pipelineAccountNumber",
          "s3BucketName",
          "slug",
          "timezone",
          "updatedAt",
          "wholeSourceConfig",
          "wholeSourceConfigVersion",
          "workspaceLimit"
        ]
      },
      "UnauthorizedError": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GraphQLError"
            }
          }
        },
        "example": {
          "errors": [
            {
              "errorType": "UnauthorizedException",
              "message": "You are not authorized to make this call."
            }
          ]
        }
      },
      "User": {
        "type": "object",
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp (e.g. 2026-04-29T12:34:56.000Z)"
          },
          "email": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp (e.g. 2026-04-29T12:34:56.000Z)"
          }
        },
        "required": [
          "createdAt",
          "email",
          "id",
          "updatedAt"
        ]
      },
      "UserRole": {
        "type": "string",
        "enum": [
          "ADMIN",
          "EDITOR",
          "VIEWER"
        ],
        "description": "GraphQL enum UserRole"
      },
      "Workspace": {
        "type": "object",
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp (e.g. 2026-04-29T12:34:56.000Z)"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organization": {
            "$ref": "#/components/schemas/Organization"
          },
          "organizationId": {
            "type": "string"
          },
          "seq": {
            "type": "integer",
            "format": "int32"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp (e.g. 2026-04-29T12:34:56.000Z)"
          }
        },
        "required": [
          "createdAt",
          "id",
          "name",
          "organization",
          "organizationId",
          "seq",
          "updatedAt"
        ]
      },
      "WorkspaceUser": {
        "type": "object",
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp (e.g. 2026-04-29T12:34:56.000Z)"
          },
          "id": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp (e.g. 2026-04-29T12:34:56.000Z)"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "userId": {
            "type": "string"
          },
          "workspace": {
            "$ref": "#/components/schemas/Workspace"
          },
          "workspaceId": {
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "id",
          "updatedAt",
          "user",
          "userId",
          "workspace",
          "workspaceId"
        ]
      }
    }
  }
}
````