---
title: "corestack_team_member_role_detach"
url: https://docs.corefinity.com/mcp/tools/corestack_team_member_role_detach
type: tool
last_updated: 2026-11-13
feature: team
related:
  - https://docs.corefinity.com/api/reference/organisation/detach-role-from-user.md
  - https://docs.corefinity.com/guides/organisation/people/users-and-invitations.md
---
# corestack_team_member_role_detach

**Take a role from a team member.** Take one role away from a team member. A company always keeps at least one owner. Scope: write.

- Scope: `write`
- Runs as a task: no

## When to use it

Take one role away from a team member: a role you may give them. A company always keeps at least one owner. This is
`POST /api/roles/detach`.

## Inputs

- `user_id` (integer, ≥ 1, required)
- `role` (string, up to 255 characters, required): the role's slug.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "role": {
      "description": "A role's slug (corestack_team_roles_list).",
      "maxLength": 255,
      "type": "string"
    },
    "user_id": {
      "description": "The team member's id (corestack_team_members_list).",
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "user_id",
    "role"
  ],
  "type": "object"
}
```

## Refusals

- `privileged_target`: the account's roles are not yours to change. Only a super administrator may change a super administrator's roles. A company owner's roles are changed only by themself, another owner of the same company or Corefinity staff, and the company's primary user's only by themself or staff.
- `forbidden`: only an owner may take roles away.
- `invalid_arguments`: on `user_id` (nobody you may see: another company's user answers like a missing one), on `role` (a role you may not take from this member), `user` (they do not hold it) or `roles` (it is the company's last owner role).
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_team_member_role_detach",
  "arguments": {
    "user_id": 1042,
    "role": "client-member-full"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_team_member_role_detach with user_id 1042, role client-member-full. (Take a role from a team member.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/roles/detach](https://docs.corefinity.com/api/reference/organisation/detach-role-from-user.md)
- Guide: [Users and invitations](https://docs.corefinity.com/guides/organisation/people/users-and-invitations.md)
