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

**Give a team member a role.** Give a team member one more role (a role you may give them; corestack_team_roles_list says which). Scope: write.

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

## When to use it

Give a team member one more role, one you may give them (corestack_team_roles_list, `assignable`). This is
`POST /api/roles/attach`. An agent never raises the permissions of the person it acts for: giving that person a role
that adds a permission or an owner role they do not hold now is refused `own_permissions_upward`.

## 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 give roles.
- `owner_grant`: only an owner of the company, or Corefinity staff, may make someone an owner (agency-owner or client-owner); holding the edit users or invite users permission is not enough. Message: "Only an owner or Corefinity staff can make someone an owner."
- `permission_grant`: the role carries a permission you do not hold (a custom role always; a standard role unless you are an owner of the company or Corefinity staff). Message: "You can only give someone a role if you hold all of its permissions yourself."
- `own_permissions_upward`: the role would give the person you act for more access; ask them to make the change in the Control Panel.
- `invalid_arguments`: on `user_id` (nobody you may see: another company's user answers like a missing one), on `message` (a role you may not give this member), `user` (they already hold it) or `role` (no such 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_attach",
  "arguments": {
    "user_id": 1042,
    "role": "client-member-full"
  }
}
```

## Prompt

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

## The same task elsewhere

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