# revokeCollaboratorSessions

mutation · in the family [Identity and access](/reference/identity-and-access/)

## What it does

Sign a collaborator out everywhere — revoke all their sessions, as staff.

STAFF: the revoke-ALL kill-switch pointed at a collaborator; revokes every currently-active session of the named collaborator, returns the count. Template class; requires the unrestricted capability.

## Careful

Use at engagement end or on compromise suspicion; pair with pausing or erasing the collaborator.

## Who may call it

Capability area: **Identity and access** — Who can sign in and what each role allows — users, roles and their assignments.

- Owner
- System Administrator
- An API key whose scope allows `api:revokeCollaboratorSessions`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `collaboratorId` | [ID](/types/#scalars) `ID!` | yes | No further notes. |

## Returns

[Int](/types/#scalars) `Int!` — A whole number.

## Example request

```graphql
mutation ExampleRevokeCollaboratorSessions($collaboratorId: ID!) {
  revokeCollaboratorSessions(collaboratorId: $collaboratorId)
}
```

Variables:

```json
{
  "collaboratorId": "01900000-0000-7000-8000-4cebc5980000"
}
```

Send it with the envelope naming the version: `"extensions": {"at": {"version": {"name":"genesis","number":0}}}`.

## Example response

```json
{
  "data": {
    "revokeCollaboratorSessions": 1
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
- `NOT_FOUND/*` — That record could not be found. ([NOT_FOUND](/errors/NOT_FOUND/))
- `CONFLICT/*` — The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. ([CONFLICT](/errors/CONFLICT/))
- `VALIDATION/VERSION_REQUIRED` — The request did not say which app version it came from. ([VALIDATION](/errors/VALIDATION/))
