Claude Platform Docs

移除 RBAC 组成员

$client->organization->rbacGroups->members->remove(string userID, string rbacGroupID): DeletedRBACGroupMember
DELETE/v1/organizations/rbac_groups/{rbac_group_id}/members/{user_id}

从 RBAC 组中移除用户。当租户中的某个组织使用 SCIM 预配时,由身份提供商预配的组(来源类型为 "scim")的成员资格无法通过 API 修改。

RBAC 组 API 仅适用于 Claude Enterprise 组织。

Parameters
rbacGroupID: string⁠Path parameter

ID of the RBAC Group.

userID: string⁠Path parameter

ID of the User.

Returns
class DeletedRBACGroupMember { $type = 'rbac_group_member_deleted'; $rbacGroupID; $userID; }
"rbac_group_member_deleted" type

Deleted object type. For RBAC Group Members, this is always "rbac_group_member_deleted".

string rbacGroupID

ID of the RBAC Group.

string userID

ID of the User.

移除 RBAC 组成员
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;

$client = new Client(apiKey: 'my-anthropic-api-key');

$deletedRBACGroupMember = $client->organization->rbacGroups->members->remove(
  'user_id', rbacGroupID: 'rbac_group_id'
);

var_dump($deletedRBACGroupMember);
Returns Examples
Response 200
{
  "rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
  "type": "rbac_group_member_deleted",
  "user_id": "user_01WxYzAbCdEfGhJkMnPqRsTu"
}