CorefinityCorefinityDocs
Open the Control PanelControl Panel
Team · 9 of 13

corestack_team_member_role_attach

Give a team member a role.

Scope writeNo secrets returned
On this page

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.

Ask for it

Prompt
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.

Inputs

rolestringRequired

The role's slug. Up to 255 characters.

user_idintegerRequired

The team member's id (corestack_team_members_list). At least 1.

Example call

tools/call
{
  "name": "corestack_team_member_role_attach",
  "arguments": {
    "user_id": 1042,
    "role": "client-member-full"
  }
}

If it is refused

ReasonWhat to do
privileged_targetThe 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.
forbiddenOnly an owner may give roles.
owner_grantOnly 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_grantThe 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_upwardThe role would give the person you act for more access; ask them to make the change in the Control Panel.
invalid_argumentsOn 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).
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT