---
title: ユーザー管理
url: https://platform.claude.com/docs/ja/manage-claude/user-management
description: Admin APIを使用してClaude Enterprise組織のメンバーを管理します。メンバーの一覧表示とロールの変更、招待の送信と取り消し、グループの管理、カスタムロールの読み取りを行います。
---

このページでは、[Admin API](https://platform.claude.com/docs/ja/api/beta/organization)を使用して、**Claude Enterprise**（claude.ai）組織のメンバーをプログラムで管理する方法について説明します。メンバーの一覧表示とメールアドレスによる検索、メンバーのロールの変更、メンバーの削除、招待の送信と取り消し、エンタープライズのグループとそのメンバーシップの管理、組織のカスタムロールの読み取りを行います。Claude Console（Claude Platform）組織については、[Claude Console向けAdmin APIガイド](https://platform.claude.com/docs/ja/manage-claude/admin-api)を参照してください。

<Note>
  グループおよびカスタムロールのリクエストには、`anthropic-beta: ce-user-management-2026-07-13` [ベータヘッダー](https://platform.claude.com/docs/ja/api/beta-headers)は必要ありません。引き続きこのヘッダーを送信するリクエストも受け付けられ、同じように動作します。
</Note>

## 組織で使用できるエンドポイント

Admin APIは、`https://api.anthropic.com/v1/organizations/`配下にある単一のエンドポイント群です。Claude Console組織とClaude Enterprise組織は[異なるキー](https://platform.claude.com/docs/ja/manage-claude/admin-api-keys)で認証し、それぞれエンドポイントの異なるサブセットにアクセスできます。

| エンドポイント                                                                                                                                                                                                                                                                                                                            | Claude Console（Claude Platform）                                                                      | Claude Enterprise（claude.ai）                                                                                                                                 |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [メンバー](https://platform.claude.com/docs/ja/manage-claude/user-management#members)と[招待](https://platform.claude.com/docs/ja/manage-claude/user-management#invites)                                                                                                                                                                  | 利用可能。[Admin APIガイド](https://platform.claude.com/docs/ja/manage-claude/admin-api)を参照                  | 利用可能（このページ）                                                                                                                                                  |
| [グループ](https://platform.claude.com/docs/ja/manage-claude/user-management#groups)                                                                                                                                                                                                                                                   | 利用不可                                                                                                 | 利用可能（このページ）                                                                                                                                                  |
| [カスタムロール](https://platform.claude.com/docs/ja/manage-claude/user-management#custom-roles)                                                                                                                                                                                                                                          | 利用不可                                                                                                 | 利用可能、読み取り専用（このページ）                                                                                                                                           |
| [支出制限](https://platform.claude.com/docs/ja/manage-claude/spend-limits-api)                                                                                                                                                                                                                                                         | 利用不可                                                                                                 | 利用可能                                                                                                                                                         |
| 使用量およびコストのレポート                                                                                                                                                                                                                                                                                                                     | 利用可能。[Usage and Cost API](https://platform.claude.com/docs/ja/manage-claude/usage-cost-api)を参照してください | [Claude Enterprise Analytics API](https://platform.claude.com/docs/ja/manage-claude/analytics-api#get-access-to-the-claude-enterprise-analytics-api)を通じて利用可能 |
| [ワークスペース](https://platform.claude.com/docs/ja/manage-claude/workspaces)、[APIキー](https://platform.claude.com/docs/ja/manage-claude/admin-api#api-keys)、[レート制限](https://platform.claude.com/docs/ja/manage-claude/rate-limits-api)、および[Admin APIガイド](https://platform.claude.com/docs/ja/manage-claude/admin-api)に記載されているその他のエンドポイント | 利用可能                                                                                                 | 利用不可                                                                                                                                                         |

メンバーと招待は、どちらの組織タイプでも同じエンドポイントです。このページでは、Claude Enterpriseの[組織ロール](https://platform.claude.com/docs/ja/manage-claude/user-management#organization-roles)を含め、Claude Enterpriseでの動作について説明します。グループおよびカスタムロールのエンドポイントは、Claude Enterpriseにのみ存在します。

<Check>
  **スコープ付きAdmin APIキーが必要です**

  これらのエンドポイントには、`read:members`スコープ（メンバーおよび招待の`GET`エンドポイント、およびすべてのカスタムロールエンドポイント。ロール専用のスコープはありません）、`write:members`スコープ（メンバーおよび招待の`POST`および`DELETE`エンドポイント）、`read:rbac_groups`スコープ（グループの`GET`エンドポイント）、または`write:rbac_groups`スコープ（グループの`POST`および`DELETE`エンドポイント）を持つAdmin APIキーが必要です。`managed`ロールの割り当て、または招待でのグループの割り当てには、`write:members`に加えて`write:rbac_groups`が必要です。`read:org_audit`スコープ（セキュリティ監査連携向けの読み取り専用スコープ）を持つキーでも、このページのすべての`GET`エンドポイントと[Compliance API](https://platform.claude.com/docs/ja/manage-claude/compliance-api)の読み取りエンドポイントを呼び出せます。プライマリオーナーがキーを作成する場所と選択すべきスコープについては、[Admin APIキーの作成](https://platform.claude.com/docs/ja/manage-claude/admin-api-keys#create-a-key-for-a-claude-enterprise-organization)を参照してください。すべてのリクエストで、[`anthropic-version`](https://platform.claude.com/docs/ja/api/versioning)ヘッダーとともに`x-api-key`ヘッダーでキーを渡してください。
</Check>

## 概要

このページでは5つのリソースについて説明します。

| リソース         | エンドポイント                                                                                                                                                                                                                                                      | 用途                                                          |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------- |
| **メンバー**     | `GET /v1/organizations/users`<br />`GET /v1/organizations/users/{user_id}`<br />`POST /v1/organizations/users/{user_id}`<br />`DELETE /v1/organizations/users/{user_id}`                                                                                     | 組織のメンバーを一覧表示する、またはメールアドレスで検索する。メンバーのロールを変更する。メンバーを削除する。     |
| **招待**       | `POST /v1/organizations/invites`<br />`GET /v1/organizations/invites`<br />`GET /v1/organizations/invites/{invite_id}`<br />`DELETE /v1/organizations/invites/{invite_id}`                                                                                   | 組織にユーザーを招待し、招待のステータスを追跡し、承諾される前に取り消す。                       |
| **グループ**     | `GET /v1/organizations/rbac_groups`<br />`GET /v1/organizations/rbac_groups/{rbac_group_id}`<br />`POST /v1/organizations/rbac_groups`<br />`POST /v1/organizations/rbac_groups/{rbac_group_id}`<br />`DELETE /v1/organizations/rbac_groups/{rbac_group_id}` | エンタープライズのグループと、各グループに割り当てられたカスタムロールを読み取る。グループを作成、名前変更、削除する。 |
| **グループメンバー** | `GET /v1/organizations/rbac_groups/{rbac_group_id}/members`<br />`POST /v1/organizations/rbac_groups/{rbac_group_id}/members`<br />`DELETE /v1/organizations/rbac_groups/{rbac_group_id}/members/{user_id}`                                                  | グループのメンバーを読み取る。メンバーを追加および削除する。                              |
| **カスタムロール**  | `GET /v1/organizations/rbac_roles`<br />`GET /v1/organizations/rbac_roles/{rbac_role_id}`<br />`GET /v1/organizations/rbac_roles/{rbac_role_id}/permissions`                                                                                                 | 組織のカスタムロールと、各ロールが付与する権限を読み取る。                               |

カスタムロールとそのグループへの付与は、[claude.aiの組織設定](https://claude.ai/admin-settings)で管理します。APIはこれらを読み取りますが、変更することはできません。

## クイックスタート

`ANTHROPIC_API_KEY`環境変数にAdmin APIキーを設定します。このページの例では、この環境変数からキーを読み取ります。SDKと`ant` CLIは、`x-api-key`ヘッダーと`anthropic-version`ヘッダーを自動的に送信します。

組織のメンバーを新しい順に一覧表示します。

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/organizations/users?limit=20" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant organization:users list --limit 20
  ```

  ```python Python
  client = anthropic.Anthropic()

  users = client.organization.users.list(limit=20)

  for user in users:
      print(f"{user.id}: {user.email} ({user.role})")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const users = await client.organization.users.list({ limit: 20 });

  for await (const user of users) {
    console.log(`${user.id}: ${user.email} (${user.role})`);
  }
  ```

  ```csharp C#
  AnthropicClient client = new();

  var page = await client.Organization.Users.List(new() { Limit = 20 });

  await foreach (var user in page.Paginate())
  {
      Console.WriteLine($"{user.ID}: {user.Email} ({user.Role.Raw()})");
  }
  ```

  ```go Go
  client := anthropic.NewClient()

  users := client.Organization.Users.ListAutoPaging(context.Background(), anthropic.OrganizationUserListParams{
  	Limit: anthropic.Int(20),
  })

  for users.Next() {
  	user := users.Current()
  	fmt.Printf("%s: %s (%s)\n", user.ID, user.Email, user.Role)
  }
  if err := users.Err(); err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java
  import com.anthropic.models.organization.users.UserListParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = UserListParams.builder()
          .limit(20)
          .build();
      var users = client.organization().users().list(params);

      for (var user : users.autoPager()) {
          IO.println(user.id() + ": " + user.email() + " (" + user.role().asString() + ")");
      }
  }
  ```

  ```php PHP
  $client = new Client();

  $users = $client->organization->users->list(limit: 20);

  foreach ($users->pagingEachItem() as $user) {
      echo "{$user->id}: {$user->email} ({$user->role})\n";
  }
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  users = client.organization.users.list(limit: 20)

  users.auto_paging_each do |user|
    puts "#{user.id}: #{user.email} (#{user.role})"
  end
  ```
</CodeGroup>

```json
{
  "data": [
    {
      "type": "user",
      "id": "user_01AbCdEfGhIjKlMnOpQrSt",
      "email": "jane@example.com",
      "name": "Jane Smith",
      "role": "user",
      "added_at": "2026-06-12T09:14:03Z"
    }
  ],
  "has_more": false,
  "first_id": "user_01AbCdEfGhIjKlMnOpQrSt",
  "last_id": "user_01AbCdEfGhIjKlMnOpQrSt"
}
```

## 主要な概念

### 組織ロール

すべてのメンバーは、組織ロールを1つだけ持ちます。読み取りでは、メンバーのロールが次の5つの値のいずれかとして返されます。

| ロール                | 意味                                     |
| ------------------ | -------------------------------------- |
| `user`             | 標準メンバー。                                |
| `managed`          | 所属するグループに付与されたカスタムロールを通じて権限が与えられるメンバー。 |
| `owner`            | 組織のオーナー。                               |
| `membership_admin` | 組織のメンバーを管理できるメンバー。                     |
| `primary_owner`    | 組織のプライマリオーナー。1人だけ存在します。                |

APIが割り当てられるのは、招待の作成時およびロールの更新時の`user`ロールと`managed`ロールのみです。`managed`の割り当てには、`write:members`に加えて`write:rbac_groups`スコープが必要です。これは、managedメンバーの権限が、所属するグループに関連付けられたカスタムロールから付与されるためです。管理ロール（`owner`、`membership_admin`、`primary_owner`）はclaude.aiの組織設定で割り当てられ、これらのロールを持つメンバーはこのAPIを通じて変更または削除できません。

### メンバーと招待

人は招待を承諾することで（または、設定されている場合は組織のシングルサインオンを通じて）メンバーになります。招待を作成すると招待メールが送信されます。その後、招待は受信者が承諾する（`accepted`）か、サーバーが割り当てた`expires_at`を過ぎる（`expired`）まで`pending`として読み取られます。取り消せるのは`pending`の招待のみです。保留中の招待のメールアドレスまたはロールを変更するには、招待を取り消して新しい招待を作成してください。

組織のプランが購入済みシートの有限プールからメンバーを割り当てる場合、保留中の招待はシートを消費します。招待作成エンドポイントはシートやティアのパラメータを受け取りません。シートは、空きのある最も低いティアから自動的に割り当てられます。空きシートがないときに招待を作成すると、シートを購入するのではなく400エラーで失敗します。招待を取り消す、期限切れにする、または後でメンバーを削除すると、シートはプールに戻ります。

### グループとロール

グループは、メンバーをカスタムロールに結び付けます（「role-based access control」（ロールベースのアクセス制御）、すなわちエンドポイントのパスやスコープ名に含まれる`rbac`）。グループは単一の組織ではなく、エンタープライズ全体（親組織とその配下のすべての組織）が所有します。そのため、グループのスコープ（`read:rbac_groups`および`write:rbac_groups`）には、リンクされたすべての組織向けに作成されたキーが必要です。各グループには`source_type`があり、claude.aiで作成されたグループは`direct`、IDプロバイダーによってプロビジョニングされたグループは`scim`です。グループの`role_ids`フィールドには、そのグループに割り当てられたカスタムロールのIDが一覧表示されます。これらは[カスタムロールエンドポイント](https://platform.claude.com/docs/ja/manage-claude/user-management#custom-roles)を使用して名前と権限に解決できます。ただし、ロールカタログは組織ごとである一方、グループはエンタープライズ全体にわたるため、エンタープライズ内の別の組織に属するロールを取得すると、そのキーでは404が返される点に注意してください。ロールデータが一時的に利用できなかった場合、このフィールドは（`[]`ではなく）`null`になります。そのため、再試行して、劣化した読み取りとロールを持たないグループを区別してください。非推奨のフィールドが2つ引き続き返されます。グループの`roles`（常に`role_ids`と同じ）と、グループメンバーの`group_id`（常に`rbac_group_id`と同じ）です。

## バージョニング

すべてのリクエストで`anthropic-version`ヘッダーを送信してください。利用可能なバージョンについては、[APIバージョン](https://platform.claude.com/docs/ja/api/versioning)を参照してください。

## レート制限

Admin APIエンドポイントは、組織ごとに**1分あたり100リクエスト**の「rate limit」（レート制限）を共有します。招待の作成には、代わりに**1時間あたり1,200リクエスト**という独自の制限があります。制限を超えたリクエストは**429 Too Many Requests**を返します。

## ページネーション

メンバーと招待の一覧はIDベースのページネーションを使用します。`limit`（デフォルト20、最大1000）と、`before_id`または`after_id`のいずれか一方のみを渡し、`has_more`が`false`になるまで各レスポンスの`first_id`および`last_id`フィールドを使用してページを進めます。グループとカスタムロールの一覧は、代わりに**不透明なカーソル**を使用します。レスポンスの`next_page`の値を、`next_page`が`null`になるまで、次のリクエストの`page`パラメータとしてそのまま渡します。

結果を反復処理すると、SDKが追加のページを自動的に取得するため、`limit`は合計数ではなくページサイズを設定します。CLIでは、メンバーと招待の一覧の場合、`--limit`は結果の合計数を設定します。グループとロールの一覧の場合は、ページサイズを設定します。

## エラーレスポンス

エラーレスポンスは、[エラー](https://platform.claude.com/docs/ja/api/errors)に記載されている標準の形式に従います。

## メンバー

### メンバーの一覧表示

`GET /v1/organizations/users`は、組織のメンバーを最近追加された順に返します。特定のメンバーを検索するには`email`でフィルタリングします。照合は大文字と小文字を区別せず、同じアドレスの一般的なバリエーションを許容します（たとえば、`jane+hiring@example.com`は`jane@example.com`に一致します）。`read:members`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[ユーザーの一覧表示](https://platform.claude.com/docs/ja/api/organization/users/list)を参照してください。

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/organizations/users?email=jane@example.com" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant organization:users list --email jane@example.com
  ```

  ```python Python
  client = anthropic.Anthropic()

  users = client.organization.users.list(email="jane@example.com")

  for user in users:
      print(f"{user.id}: {user.email} ({user.role})")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const users = await client.organization.users.list({ email: "jane@example.com" });

  for await (const user of users) {
    console.log(`${user.id}: ${user.email} (${user.role})`);
  }
  ```

  ```csharp C#
  AnthropicClient client = new();

  var page = await client.Organization.Users.List(new() { Email = "jane@example.com" });

  await foreach (var user in page.Paginate())
  {
      Console.WriteLine($"{user.ID}: {user.Email} ({user.Role.Raw()})");
  }
  ```

  ```go Go
  client := anthropic.NewClient()

  users := client.Organization.Users.ListAutoPaging(context.Background(), anthropic.OrganizationUserListParams{
  	Email: anthropic.String("jane@example.com"),
  })

  for users.Next() {
  	user := users.Current()
  	fmt.Printf("%s: %s (%s)\n", user.ID, user.Email, user.Role)
  }
  if err := users.Err(); err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java
  import com.anthropic.models.organization.users.UserListParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = UserListParams.builder()
          .email("jane@example.com")
          .build();
      var users = client.organization().users().list(params);

      for (var user : users.autoPager()) {
          IO.println(user.id() + ": " + user.email() + " (" + user.role().asString() + ")");
      }
  }
  ```

  ```php PHP
  $client = new Client();

  $users = $client->organization->users->list(email: 'jane@example.com');

  foreach ($users->pagingEachItem() as $user) {
      echo "{$user->id}: {$user->email} ({$user->role})\n";
  }
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  users = client.organization.users.list(email: "jane@example.com")

  users.auto_paging_each do |user|
    puts "#{user.id}: #{user.email} (#{user.role})"
  end
  ```
</CodeGroup>

### メンバーの取得

`GET /v1/organizations/users/{user_id}`は、IDで1人のメンバーを返します。`read:members`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[ユーザーの取得](https://platform.claude.com/docs/ja/api/organization/users/retrieve)を参照してください。

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/organizations/users/user_01AbCdEfGhIjKlMnOpQrSt" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant organization:users retrieve --user-id user_01AbCdEfGhIjKlMnOpQrSt
  ```

  ```python Python
  client = anthropic.Anthropic()

  user = client.organization.users.retrieve("user_01AbCdEfGhIjKlMnOpQrSt")

  print(f"id: {user.id}")
  print(f"email: {user.email}")
  print(f"role: {user.role}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const user = await client.organization.users.retrieve("user_01AbCdEfGhIjKlMnOpQrSt");

  console.log(`id: ${user.id}`);
  console.log(`email: ${user.email}`);
  console.log(`role: ${user.role}`);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var user = await client.Organization.Users.Retrieve("user_01AbCdEfGhIjKlMnOpQrSt");

  Console.WriteLine($"id: {user.ID}");
  Console.WriteLine($"email: {user.Email}");
  Console.WriteLine($"role: {user.Role.Raw()}");
  ```

  ```go Go
  client := anthropic.NewClient()

  user, err := client.Organization.Users.Get(context.Background(), "user_01AbCdEfGhIjKlMnOpQrSt")
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Printf("id: %s\n", user.ID)
  fmt.Printf("email: %s\n", user.Email)
  fmt.Printf("role: %s\n", user.Role)
  ```

  ```java Java
  AnthropicClient client = AnthropicOkHttpClient.fromEnv();

  var user = client.organization().users()
      .retrieve("user_01AbCdEfGhIjKlMnOpQrSt");

  IO.println("id: " + user.id());
  IO.println("email: " + user.email());
  IO.println("role: " + user.role().asString());
  ```

  ```php PHP
  $client = new Client();

  $user = $client->organization->users->retrieve(
      userID: 'user_01AbCdEfGhIjKlMnOpQrSt',
  );

  echo "id: {$user->id}\n";
  echo "email: {$user->email}\n";
  echo "role: {$user->role}\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  user = client.organization.users.retrieve("user_01AbCdEfGhIjKlMnOpQrSt")

  puts "id: #{user.id}"
  puts "email: #{user.email}"
  puts "role: #{user.role}"
  ```
</CodeGroup>

### メンバーのロールの変更

`POST /v1/organizations/users/{user_id}`は、メンバーのロールを`user`または`managed`に設定します。管理ロール（`owner`、`membership_admin`、または`primary_owner`）を持つメンバーはこのエンドポイントで変更できず、管理ロールを割り当てることもできません。どちらの場合も400が返され、これらはclaude.aiの組織設定で管理されます。組織のIDプロバイダーがロールを管理している場合（高度なSSOまたは高度なSCIMプロビジョニング）、ロールの更新は400を返します。`write:members`スコープが必要で、ロールを`managed`に変更する場合はさらに`write:rbac_groups`が必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[ユーザーの更新](https://platform.claude.com/docs/ja/api/organization/users/update)を参照してください。

<CodeGroup>
  ```bash cURL
  curl -X POST "https://api.anthropic.com/v1/organizations/users/user_01AbCdEfGhIjKlMnOpQrSt" \
    -H "content-type: application/json" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -d '{"role": "managed"}'
  ```

  ```bash CLI
  ant organization:users update \
    --user-id user_01AbCdEfGhIjKlMnOpQrSt \
    --role managed
  ```

  ```python Python
  client = anthropic.Anthropic()

  user = client.organization.users.update("user_01AbCdEfGhIjKlMnOpQrSt", role="managed")

  print(f"id: {user.id}")
  print(f"role: {user.role}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const user = await client.organization.users.update("user_01AbCdEfGhIjKlMnOpQrSt", {
    role: "managed"
  });

  console.log(`id: ${user.id}`);
  console.log(`role: ${user.role}`);
  ```

  ```csharp C#
  using Anthropic.Models.Organization.Users;
  // ...

  AnthropicClient client = new();

  var user = await client.Organization.Users.Update(
      "user_01AbCdEfGhIjKlMnOpQrSt",
      new() { Role = Role.Managed }
  );

  Console.WriteLine($"id: {user.ID}");
  Console.WriteLine($"role: {user.Role.Raw()}");
  ```

  ```go Go
  client := anthropic.NewClient()

  user, err := client.Organization.Users.Update(
  	context.Background(),
  	"user_01AbCdEfGhIjKlMnOpQrSt",
  	anthropic.OrganizationUserUpdateParams{
  		Role: anthropic.OrganizationUserUpdateParamsRoleManaged,
  	},
  )
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Printf("id: %s\n", user.ID)
  fmt.Printf("role: %s\n", user.Role)
  ```

  ```java Java
  import com.anthropic.models.organization.users.UserUpdateParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = UserUpdateParams.builder()
          .role(UserUpdateParams.Role.MANAGED)
          .build();
      var user = client.organization().users()
          .update("user_01AbCdEfGhIjKlMnOpQrSt", params);

      IO.println("id: " + user.id());
      IO.println("role: " + user.role().asString());
  }
  ```

  ```php PHP
  use Anthropic\Organization\Users\UserUpdateParams\Role;
  // ...

  $client = new Client();

  $user = $client->organization->users->update(
      userID: 'user_01AbCdEfGhIjKlMnOpQrSt',
      role: Role::MANAGED,
  );

  echo "id: {$user->id}\n";
  echo "role: {$user->role}\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  user_id = "user_01AbCdEfGhIjKlMnOpQrSt"
  user = client.organization.users.update(user_id, role: :managed)

  puts "id: #{user.id}"
  puts "role: #{user.role}"
  ```
</CodeGroup>

### メンバーの削除

`DELETE /v1/organizations/users/{user_id}`は、メンバーを組織から削除し、そのメンバーが占有していた購入済みシートがあれば組織のプールに戻します。管理ロールを持つメンバーはこのエンドポイントでは削除できません。また、IDプロバイダーがメンバーシップを管理している場合（SCIM）、削除は400を返します。`write:members`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[ユーザーの削除](https://platform.claude.com/docs/ja/api/organization/users/remove)を参照してください。

<CodeGroup>
  ```bash cURL
  curl -X DELETE "https://api.anthropic.com/v1/organizations/users/user_01AbCdEfGhIjKlMnOpQrSt" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant organization:users remove --user-id user_01AbCdEfGhIjKlMnOpQrSt
  ```

  ```python Python
  client = anthropic.Anthropic()

  removed_user = client.organization.users.remove("user_01AbCdEfGhIjKlMnOpQrSt")

  print(f"id: {removed_user.id}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const removedUser = await client.organization.users.remove("user_01AbCdEfGhIjKlMnOpQrSt");

  console.log(`id: ${removedUser.id}`);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var removedUser = await client.Organization.Users.Remove("user_01AbCdEfGhIjKlMnOpQrSt");

  Console.WriteLine($"id: {removedUser.ID}");
  ```

  ```go Go
  client := anthropic.NewClient()

  removedUser, err := client.Organization.Users.Remove(context.Background(), "user_01AbCdEfGhIjKlMnOpQrSt")
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Printf("id: %s\n", removedUser.ID)
  ```

  ```java Java
  AnthropicClient client = AnthropicOkHttpClient.fromEnv();

  var removedUser = client.organization().users()
      .remove("user_01AbCdEfGhIjKlMnOpQrSt");

  IO.println("id: " + removedUser.id());
  ```

  ```php PHP
  $client = new Client();

  $removedUser = $client->organization->users->remove(
      userID: 'user_01AbCdEfGhIjKlMnOpQrSt',
  );

  echo "id: {$removedUser->id}\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  user_id = "user_01AbCdEfGhIjKlMnOpQrSt"
  removed_user = client.organization.users.remove(user_id)

  puts "id: #{removed_user.id}"
  ```
</CodeGroup>

```json
{
  "type": "user_deleted",
  "id": "user_01AbCdEfGhIjKlMnOpQrSt"
}
```

## 招待

### 招待の作成

`POST /v1/organizations/invites`は、招待メールを送信し、サーバーが割り当てた`expires_at`を含む招待を返します。`role`は`user`または`managed`である必要があります。そのメールアドレスに対する保留中の招待がすでに存在する場合、またはそのアドレスがすでにメンバーのものである場合、リクエストは既存のリソースを示す400を返します。IDプロバイダーがユーザーを自動的にプロビジョニングする組織（JITまたはSCIM）は、APIを通じて招待を作成できません。`write:members`スコープが必要で、`role`が`managed`の場合はさらに`write:rbac_groups`が必要です。

有限のシートプールからメンバーを割り当てるプランでは、招待は空きのある最も低いティアから自動的にシートを取得します。APIはティアのパラメータを受け取りません。空きシートがない場合、リクエストはシートを購入するのではなく400エラーで失敗します。組織のプラン管理からシートを追加して、再試行してください。

オプションの`rbac_group_ids`フィールドには、メンバーが承諾したときに割り当てるグループ（`rbac_group_`プレフィックス付きのID）を一覧で指定します。空でない`rbac_group_ids`を渡す場合は、キーが`write:rbac_groups`スコープも持っている必要があります。グループの割り当てによって、グループのロールに付与された権限が与えられる可能性があるためです。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[招待の作成](https://platform.claude.com/docs/ja/api/organization/invites/create)を参照してください。

<CodeGroup>
  ```bash cURL
  curl -X POST "https://api.anthropic.com/v1/organizations/invites" \
    -H "content-type: application/json" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -d '{
      "email": "newhire@example.com",
      "role": "managed",
      "rbac_group_ids": ["rbac_group_01UvWxYzAbCdEfGhIjKlMn"]
    }'
  ```

  ```bash CLI
  ant organization:invites create \
    --email newhire@example.com \
    --role managed \
    --rbac-group-id rbac_group_01UvWxYzAbCdEfGhIjKlMn
  ```

  ```python Python
  client = anthropic.Anthropic()

  invite = client.organization.invites.create(
      email="newhire@example.com",
      role="managed",
      rbac_group_ids=["rbac_group_01UvWxYzAbCdEfGhIjKlMn"],
  )

  print(f"id: {invite.id}")
  print(f"email: {invite.email}")
  print(f"status: {invite.status}")
  print(f"expires_at: {invite.expires_at}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const invite = await client.organization.invites.create({
    email: "newhire@example.com",
    role: "managed",
    rbac_group_ids: ["rbac_group_01UvWxYzAbCdEfGhIjKlMn"]
  });

  console.log(`id: ${invite.id}`);
  console.log(`email: ${invite.email}`);
  console.log(`status: ${invite.status}`);
  console.log(`expires_at: ${invite.expires_at}`);
  ```

  ```csharp C#
  using Anthropic.Models.Organization.Invites;
  // ...

  AnthropicClient client = new();

  var invite = await client.Organization.Invites.Create(new()
  {
      Email = "newhire@example.com",
      Role = Role.Managed,
      RbacGroupIds = ["rbac_group_01UvWxYzAbCdEfGhIjKlMn"]
  });

  Console.WriteLine($"id: {invite.ID}");
  Console.WriteLine($"email: {invite.Email}");
  Console.WriteLine($"status: {invite.Status.Raw()}");
  Console.WriteLine($"expires_at: {invite.ExpiresAt:O}");
  ```

  ```go Go
  client := anthropic.NewClient()

  invite, err := client.Organization.Invites.New(context.Background(), anthropic.OrganizationInviteNewParams{
  	Email:        "newhire@example.com",
  	Role:         anthropic.OrganizationInviteNewParamsRoleManaged,
  	RBACGroupIDs: []string{"rbac_group_01UvWxYzAbCdEfGhIjKlMn"},
  })
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Printf("id: %s\n", invite.ID)
  fmt.Printf("email: %s\n", invite.Email)
  fmt.Printf("status: %s\n", invite.Status)
  fmt.Printf("expires_at: %s\n", invite.ExpiresAt.Format(time.RFC3339))
  ```

  ```java Java
  import com.anthropic.models.organization.invites.InviteCreateParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = InviteCreateParams.builder()
          .email("newhire@example.com")
          .role(InviteCreateParams.Role.MANAGED)
          .addRbacGroupId("rbac_group_01UvWxYzAbCdEfGhIjKlMn")
          .build();
      var invite = client.organization().invites().create(params);

      IO.println("id: " + invite.id());
      IO.println("email: " + invite.email());
      IO.println("status: " + invite.status().asString());
      IO.println("expires_at: " + invite.expiresAt());
  }
  ```

  ```php PHP
  use Anthropic\Organization\Invites\InviteCreateParams\Role;
  // ...

  $client = new Client();

  $invite = $client->organization->invites->create(
      email: 'newhire@example.com',
      role: Role::MANAGED,
      rbacGroupIDs: ['rbac_group_01UvWxYzAbCdEfGhIjKlMn'],
  );

  echo "id: {$invite->id}\n";
  echo "email: {$invite->email}\n";
  echo "status: {$invite->status}\n";
  echo "expires_at: {$invite->expiresAt->format(DATE_ATOM)}\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  invite = client.organization.invites.create(
    email: "newhire@example.com",
    role: :managed,
    rbac_group_ids: ["rbac_group_01UvWxYzAbCdEfGhIjKlMn"]
  )

  puts "id: #{invite.id}"
  puts "email: #{invite.email}"
  puts "status: #{invite.status}"
  puts "expires_at: #{invite.expires_at.iso8601}"
  ```
</CodeGroup>

```json
{
  "type": "invite",
  "id": "invite_01QrStUvWxYzAbCdEfGhIj",
  "email": "newhire@example.com",
  "role": "managed",
  "invited_at": "2026-07-06T16:20:11Z",
  "expires_at": "2026-07-27T16:20:11Z",
  "accepted_at": null,
  "status": "pending",
  "rbac_group_ids": ["rbac_group_01UvWxYzAbCdEfGhIjKlMn"]
}
```

### 招待の一覧表示

`GET /v1/organizations/invites`は、組織の招待を`pending`、`accepted`、`expired`の各状態にわたって新しい順に返します。ステータスフィルターはありません。`read:members`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[招待の一覧表示](https://platform.claude.com/docs/ja/api/organization/invites/list)を参照してください。

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/organizations/invites?limit=20" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant organization:invites list --limit 20
  ```

  ```python Python
  client = anthropic.Anthropic()

  invites = client.organization.invites.list(limit=20)

  for invite in invites:
      print(f"{invite.id}: {invite.email} ({invite.status})")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const invites = await client.organization.invites.list({ limit: 20 });

  for await (const invite of invites) {
    console.log(`${invite.id}: ${invite.email} (${invite.status})`);
  }
  ```

  ```csharp C#
  AnthropicClient client = new();

  var page = await client.Organization.Invites.List(new() { Limit = 20 });

  await foreach (var invite in page.Paginate())
  {
      Console.WriteLine($"{invite.ID}: {invite.Email} ({invite.Status.Raw()})");
  }
  ```

  ```go Go
  client := anthropic.NewClient()

  invites := client.Organization.Invites.ListAutoPaging(context.Background(), anthropic.OrganizationInviteListParams{
  	Limit: anthropic.Int(20),
  })

  for invites.Next() {
  	invite := invites.Current()
  	fmt.Printf("%s: %s (%s)\n", invite.ID, invite.Email, invite.Status)
  }
  if err := invites.Err(); err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java
  import com.anthropic.models.organization.invites.InviteListParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = InviteListParams.builder()
          .limit(20)
          .build();
      var invites = client.organization().invites().list(params);

      for (var invite : invites.autoPager()) {
          IO.println(invite.id() + ": " + invite.email() + " (" + invite.status().asString() + ")");
      }
  }
  ```

  ```php PHP
  $client = new Client();

  $invites = $client->organization->invites->list(limit: 20);

  foreach ($invites->pagingEachItem() as $invite) {
      echo "{$invite->id}: {$invite->email} ({$invite->status})\n";
  }
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  invites = client.organization.invites.list(limit: 20)

  invites.auto_paging_each do |invite|
    puts "#{invite.id}: #{invite.email} (#{invite.status})"
  end
  ```
</CodeGroup>

### 招待の取得

`GET /v1/organizations/invites/{invite_id}`は、IDで1つの招待を返します。`read:members`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[招待の取得](https://platform.claude.com/docs/ja/api/organization/invites/retrieve)を参照してください。

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/organizations/invites/invite_01QrStUvWxYzAbCdEfGhIj" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant organization:invites retrieve --invite-id invite_01QrStUvWxYzAbCdEfGhIj
  ```

  ```python Python
  client = anthropic.Anthropic()

  invite = client.organization.invites.retrieve("invite_01QrStUvWxYzAbCdEfGhIj")

  print(f"id: {invite.id}")
  print(f"email: {invite.email}")
  print(f"status: {invite.status}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const invite = await client.organization.invites.retrieve("invite_01QrStUvWxYzAbCdEfGhIj");

  console.log(`id: ${invite.id}`);
  console.log(`email: ${invite.email}`);
  console.log(`status: ${invite.status}`);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var invite = await client.Organization.Invites.Retrieve("invite_01QrStUvWxYzAbCdEfGhIj");

  Console.WriteLine($"id: {invite.ID}");
  Console.WriteLine($"email: {invite.Email}");
  Console.WriteLine($"status: {invite.Status.Raw()}");
  ```

  ```go Go
  client := anthropic.NewClient()

  invite, err := client.Organization.Invites.Get(context.Background(), "invite_01QrStUvWxYzAbCdEfGhIj")
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Printf("id: %s\n", invite.ID)
  fmt.Printf("email: %s\n", invite.Email)
  fmt.Printf("status: %s\n", invite.Status)
  ```

  ```java Java
  AnthropicClient client = AnthropicOkHttpClient.fromEnv();

  var invite = client.organization().invites()
      .retrieve("invite_01QrStUvWxYzAbCdEfGhIj");

  IO.println("id: " + invite.id());
  IO.println("email: " + invite.email());
  IO.println("status: " + invite.status().asString());
  ```

  ```php PHP
  $client = new Client();

  $invite = $client->organization->invites->retrieve(
      inviteID: 'invite_01QrStUvWxYzAbCdEfGhIj',
  );

  echo "id: {$invite->id}\n";
  echo "email: {$invite->email}\n";
  echo "status: {$invite->status}\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  invite = client.organization.invites.retrieve("invite_01QrStUvWxYzAbCdEfGhIj")

  puts "id: #{invite.id}"
  puts "email: #{invite.email}"
  puts "status: #{invite.status}"
  ```
</CodeGroup>

### 招待の取り消し

`DELETE /v1/organizations/invites/{invite_id}`は`pending`の招待を取り消し、招待メール内のリンクを無効化します。`accepted`の招待を取り消すと400が返されます（代わりにメンバーを削除してください）。`expired`の招待を取り消すと400が返されます。`write:members`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[招待の削除](https://platform.claude.com/docs/ja/api/organization/invites/delete)を参照してください。

<CodeGroup>
  ```bash cURL
  curl -X DELETE "https://api.anthropic.com/v1/organizations/invites/invite_01QrStUvWxYzAbCdEfGhIj" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant organization:invites delete --invite-id invite_01QrStUvWxYzAbCdEfGhIj
  ```

  ```python Python
  client = anthropic.Anthropic()

  deleted_invite = client.organization.invites.delete("invite_01QrStUvWxYzAbCdEfGhIj")

  print(f"id: {deleted_invite.id}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const deletedInvite = await client.organization.invites.delete(
    "invite_01QrStUvWxYzAbCdEfGhIj"
  );

  console.log(`id: ${deletedInvite.id}`);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var deletedInvite = await client.Organization.Invites.Delete("invite_01QrStUvWxYzAbCdEfGhIj");

  Console.WriteLine($"id: {deletedInvite.ID}");
  ```

  ```go Go
  client := anthropic.NewClient()

  deletedInvite, err := client.Organization.Invites.Delete(context.Background(), "invite_01QrStUvWxYzAbCdEfGhIj")
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Printf("id: %s\n", deletedInvite.ID)
  ```

  ```java Java
  AnthropicClient client = AnthropicOkHttpClient.fromEnv();

  var deletedInvite = client.organization().invites()
      .delete("invite_01QrStUvWxYzAbCdEfGhIj");

  IO.println("id: " + deletedInvite.id());
  ```

  ```php PHP
  $client = new Client();

  $deletedInvite = $client->organization->invites->delete(
      inviteID: 'invite_01QrStUvWxYzAbCdEfGhIj',
  );

  echo "id: {$deletedInvite->id}\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  invite_id = "invite_01QrStUvWxYzAbCdEfGhIj"
  deleted_invite = client.organization.invites.delete(invite_id)

  puts "id: #{deleted_invite.id}"
  ```
</CodeGroup>

## グループ

エンタープライズが[claude.aiの組織設定](https://claude.ai/admin-settings)またはこのAPIを通じて直接作成したグループ（`source_type: "direct"`）は、このセクションのすべてのエンドポイントをサポートします。IDプロバイダーによってプロビジョニングされたグループ（`source_type: "scim"`）は読み取りはできますが変更はできません。SCIMグループの名前変更や削除、またはメンバーシップの変更を行うと、IDプロバイダーがそのグループを所有しているため400が返されます。

### グループの一覧表示

`GET /v1/organizations/rbac_groups`は、IDプロバイダー管理（`scim`）のグループを含む、エンタープライズのグループを返します。`read:rbac_groups`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[グループの一覧表示](https://platform.claude.com/docs/ja/api/beta/organization/rbac_groups/list)を参照してください。

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/organizations/rbac_groups?limit=20" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant beta:organization:rbac-groups list --limit 20
  ```

  ```python Python
  client = anthropic.Anthropic()

  groups = client.beta.organization.rbac_groups.list(limit=20)

  for group in groups:
      print(f"{group.id}: {group.name} ({group.source_type})")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const groups = await client.beta.organization.rbacGroups.list({ limit: 20 });

  for await (const group of groups) {
    console.log(`${group.id}: ${group.name} (${group.source_type})`);
  }
  ```

  ```csharp C#
  AnthropicClient client = new();

  var page = await client.Beta.Organization.RbacGroups.List(new() { Limit = 20 });

  await foreach (var group in page.Paginate())
  {
      Console.WriteLine($"{group.ID}: {group.Name} ({group.SourceType.Raw()})");
  }
  ```

  ```go Go
  client := anthropic.NewClient()

  groups := client.Beta.Organization.RBACGroups.ListAutoPaging(context.Background(), anthropic.BetaOrganizationRBACGroupListParams{
  	Limit: anthropic.Int(20),
  })

  for groups.Next() {
  	group := groups.Current()
  	fmt.Printf("%s: %s (%s)\n", group.ID, group.Name, group.SourceType)
  }
  if err := groups.Err(); err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java
  import com.anthropic.models.beta.organization.rbacgroups.RbacGroupListParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = RbacGroupListParams.builder()
          .limit(20)
          .build();
      var groups = client.beta().organization().rbacGroups().list(params);

      for (var group : groups.autoPager()) {
          IO.println(group.id() + ": " + group.name() + " (" + group.sourceType().asString() + ")");
      }
  }
  ```

  ```php PHP
  $client = new Client();

  $groups = $client->beta->organization->rbacGroups->list(limit: 20);

  foreach ($groups->pagingEachItem() as $group) {
      echo "{$group->id}: {$group->name} ({$group->sourceType})\n";
  }
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  groups = client.beta.organization.rbac_groups.list(limit: 20)

  groups.auto_paging_each do |group|
    puts "#{group.id}: #{group.name} (#{group.source_type})"
  end
  ```
</CodeGroup>

```json
{
  "data": [
    {
      "type": "rbac_group",
      "id": "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
      "name": "Engineering",
      "source_type": "direct",
      "role_ids": ["rbac_role_01CdEfGhIjKlMnOpQrStUv"],
      "roles": ["rbac_role_01CdEfGhIjKlMnOpQrStUv"],
      "created_at": "2026-03-18T10:01:42Z",
      "updated_at": "2026-05-02T08:55:09Z"
    }
  ],
  "has_more": false,
  "next_page": null
}
```

### グループの取得

`GET /v1/organizations/rbac_groups/{rbac_group_id}`は、IDで指定した1つのグループを返します。`read:rbac_groups`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[グループの取得](https://platform.claude.com/docs/ja/api/beta/organization/rbac_groups/retrieve)を参照してください。

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant beta:organization:rbac-groups retrieve \
    --rbac-group-id rbac_group_01UvWxYzAbCdEfGhIjKlMn
  ```

  ```python Python
  client = anthropic.Anthropic()

  group = client.beta.organization.rbac_groups.retrieve(
      "rbac_group_01UvWxYzAbCdEfGhIjKlMn"
  )

  print(f"id: {group.id}")
  print(f"name: {group.name}")
  print(f"source_type: {group.source_type}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const group = await client.beta.organization.rbacGroups.retrieve(
    "rbac_group_01UvWxYzAbCdEfGhIjKlMn"
  );

  console.log(`id: ${group.id}`);
  console.log(`name: ${group.name}`);
  console.log(`source_type: ${group.source_type}`);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var group = await client.Beta.Organization.RbacGroups.Retrieve("rbac_group_01UvWxYzAbCdEfGhIjKlMn");

  Console.WriteLine($"id: {group.ID}");
  Console.WriteLine($"name: {group.Name}");
  Console.WriteLine($"source_type: {group.SourceType.Raw()}");
  ```

  ```go Go
  client := anthropic.NewClient()

  group, err := client.Beta.Organization.RBACGroups.Get(context.Background(), "rbac_group_01UvWxYzAbCdEfGhIjKlMn")
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Printf("id: %s\n", group.ID)
  fmt.Printf("name: %s\n", group.Name)
  fmt.Printf("source_type: %s\n", group.SourceType)
  ```

  ```java Java
  AnthropicClient client = AnthropicOkHttpClient.fromEnv();

  var group = client.beta().organization().rbacGroups()
      .retrieve("rbac_group_01UvWxYzAbCdEfGhIjKlMn");

  IO.println("id: " + group.id());
  IO.println("name: " + group.name());
  IO.println("source_type: " + group.sourceType().asString());
  ```

  ```php PHP
  $client = new Client();

  $group = $client->beta->organization->rbacGroups->retrieve(
      rbacGroupID: 'rbac_group_01UvWxYzAbCdEfGhIjKlMn',
  );

  echo "id: {$group->id}\n";
  echo "name: {$group->name}\n";
  echo "source_type: {$group->sourceType}\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  rbac_group_id = "rbac_group_01UvWxYzAbCdEfGhIjKlMn"
  group = client.beta.organization.rbac_groups.retrieve(rbac_group_id)

  puts "id: #{group.id}"
  puts "name: #{group.name}"
  puts "source_type: #{group.source_type}"
  ```
</CodeGroup>

### グループの作成

`POST /v1/organizations/rbac_groups`は、指定された`name`（1〜255文字）を持ち、ロールもメンバーもないグループを作成します。`write:rbac_groups`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[グループの作成](https://platform.claude.com/docs/ja/api/beta/organization/rbac_groups/create)を参照してください。

<CodeGroup>
  ```bash cURL
  curl -X POST "https://api.anthropic.com/v1/organizations/rbac_groups" \
    -H "content-type: application/json" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -d '{"name": "Engineering"}'
  ```

  ```bash CLI
  ant beta:organization:rbac-groups create --name Engineering
  ```

  ```python Python
  client = anthropic.Anthropic()

  group = client.beta.organization.rbac_groups.create(name="Engineering")

  print(f"id: {group.id}")
  print(f"name: {group.name}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const group = await client.beta.organization.rbacGroups.create({ name: "Engineering" });

  console.log(`id: ${group.id}`);
  console.log(`name: ${group.name}`);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var group = await client.Beta.Organization.RbacGroups.Create(new()
  {
      Name = "Engineering"
  });

  Console.WriteLine($"id: {group.ID}");
  Console.WriteLine($"name: {group.Name}");
  ```

  ```go Go
  client := anthropic.NewClient()

  group, err := client.Beta.Organization.RBACGroups.New(context.Background(), anthropic.BetaOrganizationRBACGroupNewParams{
  	Name: "Engineering",
  })
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Printf("id: %s\n", group.ID)
  fmt.Printf("name: %s\n", group.Name)
  ```

  ```java Java
  import com.anthropic.models.beta.organization.rbacgroups.RbacGroupCreateParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = RbacGroupCreateParams.builder()
          .name("Engineering")
          .build();
      var group = client.beta().organization().rbacGroups().create(params);

      IO.println("id: " + group.id());
      IO.println("name: " + group.name());
  }
  ```

  ```php PHP
  $client = new Client();

  $group = $client->beta->organization->rbacGroups->create(
      name: 'Engineering',
  );

  echo "id: {$group->id}\n";
  echo "name: {$group->name}\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  group = client.beta.organization.rbac_groups.create(name: "Engineering")

  puts "id: #{group.id}"
  puts "name: #{group.name}"
  ```
</CodeGroup>

```json
{
  "type": "rbac_group",
  "id": "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
  "name": "Engineering",
  "source_type": "direct",
  "role_ids": [],
  "roles": [],
  "created_at": "2026-07-09T18:00:00Z",
  "updated_at": "2026-07-09T18:00:00Z"
}
```

### グループの名前変更

`POST /v1/organizations/rbac_groups/{rbac_group_id}`は、グループを更新します。このエンドポイントで変更できるフィールドは`name`のみです。`write:rbac_groups`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[グループの更新](https://platform.claude.com/docs/ja/api/beta/organization/rbac_groups/update)を参照してください。

<CodeGroup>
  ```bash cURL
  curl -X POST "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn" \
    -H "content-type: application/json" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -d '{"name": "Platform Engineering"}'
  ```

  ```bash CLI
  ant beta:organization:rbac-groups update \
    --rbac-group-id rbac_group_01UvWxYzAbCdEfGhIjKlMn \
    --name "Platform Engineering"
  ```

  ```python Python
  client = anthropic.Anthropic()

  group = client.beta.organization.rbac_groups.update(
      "rbac_group_01UvWxYzAbCdEfGhIjKlMn", name="Platform Engineering"
  )

  print(f"id: {group.id}")
  print(f"name: {group.name}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const group = await client.beta.organization.rbacGroups.update(
    "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
    { name: "Platform Engineering" }
  );

  console.log(`id: ${group.id}`);
  console.log(`name: ${group.name}`);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var group = await client.Beta.Organization.RbacGroups.Update(
      "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
      new() { Name = "Platform Engineering" }
  );

  Console.WriteLine($"id: {group.ID}");
  Console.WriteLine($"name: {group.Name}");
  ```

  ```go Go
  client := anthropic.NewClient()

  group, err := client.Beta.Organization.RBACGroups.Update(
  	context.Background(),
  	"rbac_group_01UvWxYzAbCdEfGhIjKlMn",
  	anthropic.BetaOrganizationRBACGroupUpdateParams{
  		Name: anthropic.String("Platform Engineering"),
  	},
  )
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Printf("id: %s\n", group.ID)
  fmt.Printf("name: %s\n", group.Name)
  ```

  ```java Java
  import com.anthropic.models.beta.organization.rbacgroups.RbacGroupUpdateParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = RbacGroupUpdateParams.builder()
          .name("Platform Engineering")
          .build();
      var group = client.beta().organization().rbacGroups()
          .update("rbac_group_01UvWxYzAbCdEfGhIjKlMn", params);

      IO.println("id: " + group.id());
      IO.println("name: " + group.name());
  }
  ```

  ```php PHP
  $client = new Client();

  $group = $client->beta->organization->rbacGroups->update(
      rbacGroupID: 'rbac_group_01UvWxYzAbCdEfGhIjKlMn',
      name: 'Platform Engineering',
  );

  echo "id: {$group->id}\n";
  echo "name: {$group->name}\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  rbac_group_id = "rbac_group_01UvWxYzAbCdEfGhIjKlMn"
  group = client.beta.organization.rbac_groups.update(rbac_group_id, name: "Platform Engineering")

  puts "id: #{group.id}"
  puts "name: #{group.name}"
  ```
</CodeGroup>

### グループの削除

`DELETE /v1/organizations/rbac_groups/{rbac_group_id}`は、グループを削除します。グループのメンバーは引き続きそれぞれの組織のメンバーのままですが、グループに割り当てられたロールの権限を失います。また、グループの[支出制限](https://platform.claude.com/docs/ja/manage-claude/spend-limits-api)が存在していた場合、それはメンバーに適用されなくなります。`write:rbac_groups`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[グループの削除](https://platform.claude.com/docs/ja/api/beta/organization/rbac_groups/delete)を参照してください。

<CodeGroup>
  ```bash cURL
  curl -X DELETE "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant beta:organization:rbac-groups delete \
    --rbac-group-id rbac_group_01UvWxYzAbCdEfGhIjKlMn
  ```

  ```python Python
  client = anthropic.Anthropic()

  deleted_group = client.beta.organization.rbac_groups.delete(
      "rbac_group_01UvWxYzAbCdEfGhIjKlMn"
  )

  print(f"id: {deleted_group.id}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const deletedGroup = await client.beta.organization.rbacGroups.delete(
    "rbac_group_01UvWxYzAbCdEfGhIjKlMn"
  );

  console.log(`id: ${deletedGroup.id}`);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var deletedGroup = await client.Beta.Organization.RbacGroups.Delete(
      "rbac_group_01UvWxYzAbCdEfGhIjKlMn"
  );

  Console.WriteLine($"id: {deletedGroup.ID}");
  ```

  ```go Go
  client := anthropic.NewClient()

  deletedGroup, err := client.Beta.Organization.RBACGroups.Delete(context.Background(), "rbac_group_01UvWxYzAbCdEfGhIjKlMn")
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Printf("id: %s\n", deletedGroup.ID)
  ```

  ```java Java
  AnthropicClient client = AnthropicOkHttpClient.fromEnv();

  var deletedGroup = client.beta().organization().rbacGroups()
      .delete("rbac_group_01UvWxYzAbCdEfGhIjKlMn");

  IO.println("id: " + deletedGroup.id());
  ```

  ```php PHP
  $client = new Client();

  $deletedGroup = $client->beta->organization->rbacGroups->delete(
      rbacGroupID: 'rbac_group_01UvWxYzAbCdEfGhIjKlMn',
  );

  echo "id: {$deletedGroup->id}\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  rbac_group_id = "rbac_group_01UvWxYzAbCdEfGhIjKlMn"
  deleted_group = client.beta.organization.rbac_groups.delete(rbac_group_id)

  puts "id: #{deleted_group.id}"
  ```
</CodeGroup>

```json
{
  "id": "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
  "type": "rbac_group_deleted"
}
```

### グループのメンバーの一覧表示

`GET /v1/organizations/rbac_groups/{rbac_group_id}/members`は、グループのメンバー（それぞれの`user_id`とメールアドレスを含む）を古い順に返します。エンタープライズの組織の現在のメンバーのみが返されるため、`has_more`が`true`であっても、ページに含まれるエントリが`limit`より少ない場合があります。`read:rbac_groups`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[グループメンバーの一覧表示](https://platform.claude.com/docs/ja/api/beta/organization/rbac_groups/members/list)を参照してください。

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn/members?limit=100" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant beta:organization:rbac-groups:members list \
    --rbac-group-id rbac_group_01UvWxYzAbCdEfGhIjKlMn \
    --limit 100
  ```

  ```python Python
  client = anthropic.Anthropic()

  members = client.beta.organization.rbac_groups.members.list(
      "rbac_group_01UvWxYzAbCdEfGhIjKlMn", limit=100
  )

  for member in members:
      print(f"{member.user_id}: {member.email}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const members = await client.beta.organization.rbacGroups.members.list(
    "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
    { limit: 100 }
  );

  for await (const member of members) {
    console.log(`${member.user_id}: ${member.email}`);
  }
  ```

  ```csharp C#
  AnthropicClient client = new();

  var page = await client.Beta.Organization.RbacGroups.Members.List(
      "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
      new() { Limit = 100 }
  );

  await foreach (var member in page.Paginate())
  {
      Console.WriteLine($"{member.UserID}: {member.Email}");
  }
  ```

  ```go Go
  client := anthropic.NewClient()

  members := client.Beta.Organization.RBACGroups.Members.ListAutoPaging(
  	context.Background(),
  	"rbac_group_01UvWxYzAbCdEfGhIjKlMn",
  	anthropic.BetaOrganizationRBACGroupMemberListParams{
  		Limit: anthropic.Int(100),
  	},
  )

  for members.Next() {
  	member := members.Current()
  	fmt.Printf("%s: %s\n", member.UserID, member.Email)
  }
  if err := members.Err(); err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java
  import com.anthropic.models.beta.organization.rbacgroups.members.MemberListParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = MemberListParams.builder()
          .limit(100)
          .build();
      var members = client.beta().organization().rbacGroups().members()
          .list("rbac_group_01UvWxYzAbCdEfGhIjKlMn", params);

      for (var member : members.autoPager()) {
          IO.println(member.userId() + ": " + member.email());
      }
  }
  ```

  ```php PHP
  $client = new Client();

  $members = $client->beta->organization->rbacGroups->members->list(
      rbacGroupID: 'rbac_group_01UvWxYzAbCdEfGhIjKlMn',
      limit: 100,
  );

  foreach ($members->pagingEachItem() as $member) {
      echo "{$member->userID}: {$member->email}\n";
  }
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  rbac_group_id = "rbac_group_01UvWxYzAbCdEfGhIjKlMn"
  members = client.beta.organization.rbac_groups.members.list(rbac_group_id, limit: 100)

  members.auto_paging_each do |member|
    puts "#{member.user_id}: #{member.email}"
  end
  ```
</CodeGroup>

```json
{
  "data": [
    {
      "type": "rbac_group_member",
      "rbac_group_id": "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
      "group_id": "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
      "user_id": "user_01AbCdEfGhIjKlMnOpQrSt",
      "email": "jane@example.com",
      "created_at": "2026-04-07T12:30:00Z"
    }
  ],
  "has_more": false,
  "next_page": null
}
```

### グループへのメンバーの追加

`POST /v1/organizations/rbac_groups/{rbac_group_id}/members`は、`user_id`で指定した組織のメンバーをグループに追加します。ユーザーはすでにエンタープライズのいずれかの組織のメンバーである必要があり（そうでない場合、リクエストは404を返します）、すでにグループに所属しているユーザーを追加すると400が返されます。`scim`グループの場合、メンバーシップはIDプロバイダーで管理されるため、このリクエストは400を返します。まだ参加していないユーザーにグループを割り当てるには、代わりに[招待の作成](https://platform.claude.com/docs/ja/manage-claude/user-management#create-an-invite)時に`rbac_group_ids`を使用してください。`write:rbac_groups`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[グループメンバーの追加](https://platform.claude.com/docs/ja/api/beta/organization/rbac_groups/members/add)を参照してください。

<CodeGroup>
  ```bash cURL
  curl -X POST "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn/members" \
    -H "content-type: application/json" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -d '{"user_id": "user_01AbCdEfGhIjKlMnOpQrSt"}'
  ```

  ```bash CLI
  ant beta:organization:rbac-groups:members add \
    --rbac-group-id rbac_group_01UvWxYzAbCdEfGhIjKlMn \
    --user-id user_01AbCdEfGhIjKlMnOpQrSt
  ```

  ```python Python
  client = anthropic.Anthropic()

  member = client.beta.organization.rbac_groups.members.add(
      "rbac_group_01UvWxYzAbCdEfGhIjKlMn", user_id="user_01AbCdEfGhIjKlMnOpQrSt"
  )

  print(f"user_id: {member.user_id}")
  print(f"email: {member.email}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const member = await client.beta.organization.rbacGroups.members.add(
    "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
    { user_id: "user_01AbCdEfGhIjKlMnOpQrSt" }
  );

  console.log(`user_id: ${member.user_id}`);
  console.log(`email: ${member.email}`);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var member = await client.Beta.Organization.RbacGroups.Members.Add(
      "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
      new() { UserID = "user_01AbCdEfGhIjKlMnOpQrSt" }
  );

  Console.WriteLine($"user_id: {member.UserID}");
  Console.WriteLine($"email: {member.Email}");
  ```

  ```go Go
  client := anthropic.NewClient()

  member, err := client.Beta.Organization.RBACGroups.Members.Add(
  	context.Background(),
  	"rbac_group_01UvWxYzAbCdEfGhIjKlMn",
  	anthropic.BetaOrganizationRBACGroupMemberAddParams{
  		UserID: "user_01AbCdEfGhIjKlMnOpQrSt",
  	},
  )
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Printf("user_id: %s\n", member.UserID)
  fmt.Printf("email: %s\n", member.Email)
  ```

  ```java Java
  import com.anthropic.models.beta.organization.rbacgroups.members.MemberAddParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = MemberAddParams.builder()
          .userId("user_01AbCdEfGhIjKlMnOpQrSt")
          .build();
      var member = client.beta().organization().rbacGroups().members()
          .add("rbac_group_01UvWxYzAbCdEfGhIjKlMn", params);

      IO.println("user_id: " + member.userId());
      IO.println("email: " + member.email());
  }
  ```

  ```php PHP
  $client = new Client();

  $member = $client->beta->organization->rbacGroups->members->add(
      rbacGroupID: 'rbac_group_01UvWxYzAbCdEfGhIjKlMn',
      userID: 'user_01AbCdEfGhIjKlMnOpQrSt',
  );

  echo "user_id: {$member->userID}\n";
  echo "email: {$member->email}\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  rbac_group_id = "rbac_group_01UvWxYzAbCdEfGhIjKlMn"
  member = client.beta.organization.rbac_groups.members.add(
    rbac_group_id,
    user_id: "user_01AbCdEfGhIjKlMnOpQrSt"
  )

  puts "user_id: #{member.user_id}"
  puts "email: #{member.email}"
  ```
</CodeGroup>

```json
{
  "type": "rbac_group_member",
  "rbac_group_id": "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
  "group_id": "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
  "user_id": "user_01AbCdEfGhIjKlMnOpQrSt",
  "email": "jane@example.com",
  "created_at": "2026-07-09T18:00:00Z"
}
```

### グループからのメンバーの削除

`DELETE /v1/organizations/rbac_groups/{rbac_group_id}/members/{user_id}`は、メンバーをグループから削除します。そのメンバーは引き続き組織のメンバーのままです。ユーザーがグループのメンバーでない場合、リクエストは404を返します。また、メンバーシップがIDプロバイダーで管理される`scim`グループの場合は400を返します。`write:rbac_groups`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[グループメンバーの削除](https://platform.claude.com/docs/ja/api/beta/organization/rbac_groups/members/remove)を参照してください。

<CodeGroup>
  ```bash cURL
  curl -X DELETE "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn/members/user_01AbCdEfGhIjKlMnOpQrSt" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant beta:organization:rbac-groups:members remove \
    --rbac-group-id rbac_group_01UvWxYzAbCdEfGhIjKlMn \
    --user-id user_01AbCdEfGhIjKlMnOpQrSt
  ```

  ```python Python
  client = anthropic.Anthropic()

  removed_member = client.beta.organization.rbac_groups.members.remove(
      "user_01AbCdEfGhIjKlMnOpQrSt", rbac_group_id="rbac_group_01UvWxYzAbCdEfGhIjKlMn"
  )

  print(f"user_id: {removed_member.user_id}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const removedMember = await client.beta.organization.rbacGroups.members.remove(
    "user_01AbCdEfGhIjKlMnOpQrSt",
    { rbac_group_id: "rbac_group_01UvWxYzAbCdEfGhIjKlMn" }
  );

  console.log(`user_id: ${removedMember.user_id}`);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var removedMember = await client.Beta.Organization.RbacGroups.Members.Remove(
      "user_01AbCdEfGhIjKlMnOpQrSt",
      new() { RbacGroupID = "rbac_group_01UvWxYzAbCdEfGhIjKlMn" }
  );

  Console.WriteLine($"user_id: {removedMember.UserID}");
  ```

  ```go Go
  client := anthropic.NewClient()

  removedMember, err := client.Beta.Organization.RBACGroups.Members.Remove(
  	context.Background(),
  	"user_01AbCdEfGhIjKlMnOpQrSt",
  	anthropic.BetaOrganizationRBACGroupMemberRemoveParams{
  		RBACGroupID: "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
  	},
  )
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Printf("user_id: %s\n", removedMember.UserID)
  ```

  ```java Java
  import com.anthropic.models.beta.organization.rbacgroups.members.MemberRemoveParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = MemberRemoveParams.builder()
          .rbacGroupId("rbac_group_01UvWxYzAbCdEfGhIjKlMn")
          .build();
      var removedMember = client.beta().organization().rbacGroups().members()
          .remove("user_01AbCdEfGhIjKlMnOpQrSt", params);

      IO.println("user_id: " + removedMember.userId());
  }
  ```

  ```php PHP
  $client = new Client();

  $removedMember = $client->beta->organization->rbacGroups->members->remove(
      userID: 'user_01AbCdEfGhIjKlMnOpQrSt',
      rbacGroupID: 'rbac_group_01UvWxYzAbCdEfGhIjKlMn',
  );

  echo "user_id: {$removedMember->userID}\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  rbac_group_id = "rbac_group_01UvWxYzAbCdEfGhIjKlMn"
  removed_member = client.beta.organization.rbac_groups.members.remove(
    "user_01AbCdEfGhIjKlMnOpQrSt",
    rbac_group_id: rbac_group_id
  )

  puts "user_id: #{removed_member.user_id}"
  ```
</CodeGroup>

```json
{
  "rbac_group_id": "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
  "group_id": "rbac_group_01UvWxYzAbCdEfGhIjKlMn",
  "user_id": "user_01AbCdEfGhIjKlMnOpQrSt",
  "type": "rbac_group_member_deleted"
}
```

## カスタムロール

カスタムロールはAPIを通じては読み取り専用です。これらのエンドポイントは、組織のカスタムロール（[claude.aiの組織設定](https://claude.ai/admin-settings)で定義されたもの、またはAnthropicによってプロビジョニングされたもの）と、各ロールが付与する権限をカタログ化します。カスタムロールの読み取りは`read:members`スコープを使用し（ロール専用のスコープはありません）、組織レベルのキーで動作します。グループエンドポイントとは異なり、リンクされたすべての組織向けに作成されたキーは必要なく、返されるカタログは自組織のものです。

ロールの名前は`display_name`フィールドから読み取ってください。非推奨の`name`フィールドも引き続き返され、常に`display_name`と等しくなります。Anthropicによってプロビジョニングされたロールの場合、`display_name`はclaude.aiに表示されるラベルと異なることがあり、Anthropicが名前を変更する可能性があります。ロールへの永続的な参照を保持するには、その`id`を保存してください。

### ロールの一覧表示

`GET /v1/organizations/rbac_roles`は、組織のカスタムロールを返します。`read:members`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[ロールの一覧表示](https://platform.claude.com/docs/ja/api/beta/organization/rbac_roles/list)を参照してください。

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/organizations/rbac_roles?limit=20" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant beta:organization:rbac-roles list --limit 20
  ```

  ```python Python
  client = anthropic.Anthropic()

  roles = client.beta.organization.rbac_roles.list(limit=20)

  for role in roles:
      print(f"{role.id}: {role.display_name}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const roles = await client.beta.organization.rbacRoles.list({ limit: 20 });

  for await (const role of roles) {
    console.log(`${role.id}: ${role.display_name}`);
  }
  ```

  ```csharp C#
  AnthropicClient client = new();

  var page = await client.Beta.Organization.RbacRoles.List(new() { Limit = 20 });

  await foreach (var role in page.Paginate())
  {
      Console.WriteLine($"{role.ID}: {role.DisplayName}");
  }
  ```

  ```go Go
  client := anthropic.NewClient()

  roles := client.Beta.Organization.RBACRoles.ListAutoPaging(context.Background(), anthropic.BetaOrganizationRBACRoleListParams{
  	Limit: anthropic.Int(20),
  })

  for roles.Next() {
  	role := roles.Current()
  	fmt.Printf("%s: %s\n", role.ID, role.DisplayName)
  }
  if err := roles.Err(); err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java
  import com.anthropic.models.beta.organization.rbacroles.RbacRoleListParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = RbacRoleListParams.builder()
          .limit(20)
          .build();
      var roles = client.beta().organization().rbacRoles().list(params);

      for (var role : roles.autoPager()) {
          IO.println(role.id() + ": " + role.displayName());
      }
  }
  ```

  ```php PHP
  $client = new Client();

  $roles = $client->beta->organization->rbacRoles->list(limit: 20);

  foreach ($roles->pagingEachItem() as $role) {
      echo "{$role->id}: {$role->displayName}\n";
  }
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  roles = client.beta.organization.rbac_roles.list(limit: 20)

  roles.auto_paging_each do |role|
    puts "#{role.id}: #{role.display_name}"
  end
  ```
</CodeGroup>

```json
{
  "data": [
    {
      "type": "rbac_role",
      "id": "rbac_role_01CdEfGhIjKlMnOpQrStUv",
      "display_name": "Engineering base",
      "name": "Engineering base",
      "created_at": "2026-03-18T10:01:42Z",
      "updated_at": "2026-05-02T08:55:09Z"
    }
  ],
  "has_more": false,
  "next_page": null
}
```

### ロールの取得

`GET /v1/organizations/rbac_roles/{rbac_role_id}`は、IDで指定した1つのロールを返します。`read:members`スコープが必要です。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[ロールの取得](https://platform.claude.com/docs/ja/api/beta/organization/rbac_roles/retrieve)を参照してください。

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/organizations/rbac_roles/rbac_role_01CdEfGhIjKlMnOpQrStUv" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant beta:organization:rbac-roles retrieve \
    --rbac-role-id rbac_role_01CdEfGhIjKlMnOpQrStUv
  ```

  ```python Python
  client = anthropic.Anthropic()

  role = client.beta.organization.rbac_roles.retrieve("rbac_role_01CdEfGhIjKlMnOpQrStUv")

  print(f"id: {role.id}")
  print(f"display_name: {role.display_name}")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const role = await client.beta.organization.rbacRoles.retrieve(
    "rbac_role_01CdEfGhIjKlMnOpQrStUv"
  );

  console.log(`id: ${role.id}`);
  console.log(`display_name: ${role.display_name}`);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var role = await client.Beta.Organization.RbacRoles.Retrieve("rbac_role_01CdEfGhIjKlMnOpQrStUv");

  Console.WriteLine($"id: {role.ID}");
  Console.WriteLine($"display_name: {role.DisplayName}");
  ```

  ```go Go
  client := anthropic.NewClient()

  role, err := client.Beta.Organization.RBACRoles.Get(context.Background(), "rbac_role_01CdEfGhIjKlMnOpQrStUv")
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Printf("id: %s\n", role.ID)
  fmt.Printf("display_name: %s\n", role.DisplayName)
  ```

  ```java Java
  AnthropicClient client = AnthropicOkHttpClient.fromEnv();

  var role = client.beta().organization().rbacRoles()
      .retrieve("rbac_role_01CdEfGhIjKlMnOpQrStUv");

  IO.println("id: " + role.id());
  IO.println("display_name: " + role.displayName());
  ```

  ```php PHP
  $client = new Client();

  $role = $client->beta->organization->rbacRoles->retrieve(
      rbacRoleID: 'rbac_role_01CdEfGhIjKlMnOpQrStUv',
  );

  echo "id: {$role->id}\n";
  echo "display_name: {$role->displayName}\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  rbac_role_id = "rbac_role_01CdEfGhIjKlMnOpQrStUv"
  role = client.beta.organization.rbac_roles.retrieve(rbac_role_id)

  puts "id: #{role.id}"
  puts "display_name: #{role.display_name}"
  ```
</CodeGroup>

### ロールの権限の一覧表示

`GET /v1/organizations/rbac_roles/{rbac_role_id}/permissions`は、ロールの権限を返します。各権限は、`resource`（適用対象。組織のプロダクト機能、コネクタツール、コネクタのOAuthスコープ、1つのコネクタ、またはすべてのコネクタ）と`action`（そのリソースに対して付与される内容）の組み合わせです。組織で有効になっていない機能の行は省略されるため、`has_more`が`true`であっても、ページに含まれる行が`limit`より少ない場合があります。`read:members`スコープが必要です。

2つの`action`値には特に注意が必要です。actionが`capability_access_all`（すべての製品機能）または`capability_access_all_ga`（すべての安定版製品機能、つまりベータまたはリサーチプレビューのラベルが付いていないすべての機能）である`organization`権限は包括的な付与（モデルアクセスも`permission_`プレフィックス付きの管理パネル権限も対象としないもの）であり、展開されずにその1行として一覧表示されます。ロールが付与する内容を集計する際は、包括的な行を、他の行で名前が挙げられている機能だけでなく、そのバリアントが示すすべてを対象とするものとして扱ってください。

パラメータの詳細とレスポンススキーマについては、APIリファレンスの[ロール権限の一覧表示](https://platform.claude.com/docs/ja/api/beta/organization/rbac_roles/permissions/list)を参照してください。

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/organizations/rbac_roles/rbac_role_01CdEfGhIjKlMnOpQrStUv/permissions?limit=20" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01"
  ```

  ```bash CLI
  ant beta:organization:rbac-roles:permissions list \
    --rbac-role-id rbac_role_01CdEfGhIjKlMnOpQrStUv \
    --limit 20
  ```

  ```python Python
  client = anthropic.Anthropic()

  permissions = client.beta.organization.rbac_roles.permissions.list(
      "rbac_role_01CdEfGhIjKlMnOpQrStUv", limit=20
  )

  for permission in permissions:
      print(permission.action)
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const permissions = await client.beta.organization.rbacRoles.permissions.list(
    "rbac_role_01CdEfGhIjKlMnOpQrStUv",
    { limit: 20 }
  );

  for await (const permission of permissions) {
    console.log(permission.action);
  }
  ```

  ```csharp C#
  AnthropicClient client = new();

  var page = await client.Beta.Organization.RbacRoles.Permissions.List(
      "rbac_role_01CdEfGhIjKlMnOpQrStUv",
      new() { Limit = 20 }
  );

  await foreach (var permission in page.Paginate())
  {
      Console.WriteLine(permission.Action);
  }
  ```

  ```go Go
  client := anthropic.NewClient()

  permissions := client.Beta.Organization.RBACRoles.Permissions.ListAutoPaging(
  	context.Background(),
  	"rbac_role_01CdEfGhIjKlMnOpQrStUv",
  	anthropic.BetaOrganizationRBACRolePermissionListParams{
  		Limit: anthropic.Int(20),
  	},
  )

  for permissions.Next() {
  	permission := permissions.Current()
  	fmt.Println(permission.Action)
  }
  if err := permissions.Err(); err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java
  import com.anthropic.models.beta.organization.rbacroles.permissions.PermissionListParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = PermissionListParams.builder()
          .limit(20)
          .build();
      var permissions = client.beta().organization().rbacRoles().permissions()
          .list("rbac_role_01CdEfGhIjKlMnOpQrStUv", params);

      for (var permission : permissions.autoPager()) {
          IO.println(permission.action());
      }
  }
  ```

  ```php PHP
  $client = new Client();

  $permissions = $client->beta->organization->rbacRoles->permissions->list(
      rbacRoleID: 'rbac_role_01CdEfGhIjKlMnOpQrStUv',
      limit: 20,
  );

  foreach ($permissions->pagingEachItem() as $permission) {
      echo "{$permission->action}\n";
  }
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  rbac_role_id = "rbac_role_01CdEfGhIjKlMnOpQrStUv"
  permissions = client.beta.organization.rbac_roles.permissions.list(rbac_role_id, limit: 20)

  permissions.auto_paging_each do |permission|
    puts permission.action
  end
  ```
</CodeGroup>

```json
{
  "data": [
    {
      "type": "rbac_role_permission",
      "resource": {
        "type": "organization",
        "organization_id": "12345678-1234-5678-1234-567812345678"
      },
      "action": "capability_access_all_ga"
    },
    {
      "type": "rbac_role_permission",
      "resource": {
        "type": "connector_tool",
        "connector_id": "mcpsrv_01WxYzAbCdEfGhIjKlMnOp",
        "tool_name": "search_tickets"
      },
      "action": "use"
    }
  ],
  "has_more": false,
  "next_page": null
}
```

## ワークフローの例

### 退職する従業員のオフボーディング

1. メールでメンバーを検索します。

   <CodeGroup>
     ```bash cURL
     curl "https://api.anthropic.com/v1/organizations/users?email=departing@example.com" \
       -H "x-api-key: $ANTHROPIC_API_KEY" \
       -H "anthropic-version: 2023-06-01"
     ```

     ```bash CLI
     ant organization:users list --email departing@example.com
     ```

     ```python Python
     client = anthropic.Anthropic()

     users = client.organization.users.list(email="departing@example.com")

     for user in users:
         print(f"{user.id}: {user.email} ({user.role})")
     ```

     ```typescript TypeScript
     const client = new Anthropic();

     const users = await client.organization.users.list({ email: "departing@example.com" });

     for await (const user of users) {
       console.log(`${user.id}: ${user.email} (${user.role})`);
     }
     ```

     ```csharp C#
     AnthropicClient client = new();

     var page = await client.Organization.Users.List(new() { Email = "departing@example.com" });

     await foreach (var user in page.Paginate())
     {
         Console.WriteLine($"{user.ID}: {user.Email} ({user.Role.Raw()})");
     }
     ```

     ```go Go
     client := anthropic.NewClient()

     users := client.Organization.Users.ListAutoPaging(context.Background(), anthropic.OrganizationUserListParams{
     	Email: anthropic.String("departing@example.com"),
     })

     for users.Next() {
     	user := users.Current()
     	fmt.Printf("%s: %s (%s)\n", user.ID, user.Email, user.Role)
     }
     if err := users.Err(); err != nil {
     	log.Fatal(err)
     }
     ```

     ```java Java
     import com.anthropic.models.organization.users.UserListParams;

     void main() {
         AnthropicClient client = AnthropicOkHttpClient.fromEnv();

         var params = UserListParams.builder()
             .email("departing@example.com")
             .build();
         var users = client.organization().users().list(params);

         for (var user : users.autoPager()) {
             IO.println(user.id() + ": " + user.email() + " (" + user.role().asString() + ")");
         }
     }
     ```

     ```php PHP
     $client = new Client();

     $users = $client->organization->users->list(email: 'departing@example.com');

     foreach ($users->pagingEachItem() as $user) {
         echo "{$user->id}: {$user->email} ({$user->role})\n";
     }
     ```

     ```ruby Ruby
     client = Anthropic::Client.new

     users = client.organization.users.list(email: "departing@example.com")

     users.auto_paging_each do |user|
       puts "#{user.id}: #{user.email} (#{user.role})"
     end
     ```
   </CodeGroup>

2. レスポンスの`id`を使用して、`DELETE /v1/organizations/users/{user_id}`でメンバーを削除します。シートがあればプールに戻ります。

3. その人がまだ参加していなかった場合、検索ではメンバーが返されません。代わりに招待を一覧表示し、その人の`pending`の招待を取り消してください。

### グループメンバーシップの監査

1. グループを一覧表示し、各グループの`id`、`name`、`role_ids`を記録します。

2. 機密性の高いロールを持つ各グループについて、`GET /v1/organizations/rbac_groups/{rbac_group_id}/members`をページ単位で取得し、メンバーのメールアドレスをIDプロバイダーの名簿と照合します。

3. グループに所属すべきでなくなったメンバーを、`DELETE /v1/organizations/rbac_groups/{rbac_group_id}/members/{user_id}`で削除します。`scim`グループの場合は、代わりにIDプロバイダーで変更を行ってください。

グループメンバーシップと一時的な支出制限の引き上げを組み合わせたワークフローについては、Spend Limits APIページの[インシデント中にメンバーの支出制限を一時的に引き上げる](https://platform.claude.com/docs/ja/manage-claude/spend-limits-api#temporarily-raise-a-members-spend-limit-during-an-incident)を参照してください。

## よくある質問

### これはAdmin APIとは別のAPIですか？

いいえ。メンバーおよび招待のエンドポイントは、Claude Console組織が使用するものと同じ`/v1/organizations/`エンドポイントです。このページでは、Claude Enterpriseでの動作について説明しています。グループおよびカスタムロールのエンドポイントは同じAPIの一部であり、Claude Enterprise組織にのみ存在します。[利用可否の表](https://platform.claude.com/docs/ja/manage-claude/user-management#which-endpoints-can-your-organization-use)に、各組織タイプが呼び出せるエンドポイントが示されています。

### APIを通じてオーナーまたはメンバーシップ管理者のロールを割り当てることはできますか？

いいえ。APIが割り当てるのは、招待の作成時とロールの更新時における`user`と`managed`のみです。管理ロールはclaude.aiの組織設定で割り当てられ、これらのロールを持つメンバーはAPIを通じて変更または削除できません。

### APIを通じてグループを作成または変更できますか？

はい、`write:rbac_groups`スコープがあれば可能です。グループの作成、名前変更、削除、およびメンバーの追加または削除ができます。APIで変更できないものが2つあります。IDプロバイダーによってプロビジョニングされたグループ（`source_type: "scim"`）は、名前とメンバーシップをIDプロバイダーが所有しています。また、カスタムロールはclaude.aiの組織設定で管理されます（APIは[読み取り](https://platform.claude.com/docs/ja/manage-claude/user-management#custom-roles)を行います）。

### 未承諾の招待はシートを消費しますか？

有限のシートプールを持つプランでは、はい。`pending`の招待はシートを保持します。招待を取り消すか期限切れにすると、シートが解放されます。シートプールのないプランでは、招待は何も消費しません。

### 私の組織はシングルサインオンを使用しています。どの操作が機能しますか？

IDプロバイダーがユーザーを自動的にプロビジョニングする場合（JITまたはSCIM）、招待の作成は400を返します。IDプロバイダーがロールを管理する場合（高度なSSOまたは高度なSCIMプロビジョニング）、ロールの更新は400を返します。IDプロバイダーがメンバーシップを管理する場合（SCIMプロビジョニング）、メンバーの削除は400を返します。読み取りはいずれの場合も機能します。

### Admin APIキーを作成した人が退職した場合、そのキーはどうなりますか？

キーは引き続き機能します。Admin APIキーは個々のユーザーではなく組織にスコープされており、claude.aiで作成されたキーは期限切れになりません。作成者を組織から削除したり、IDプロバイダーを通じてプロビジョニングを解除したりすると、その人自身のアクセスは終了しますが、その人が作成したキーは終了しません。ロールをダウングレードしてもキーは変わりません。各キーは元のスコープのまま有効です。Admin APIキーを作成した人をオフボーディングする際は、[claude.ai > 組織設定 > API](https://claude.ai/admin-settings/api-access)の**キー**セクションでそれらのキーを削除し、代わりのキーを作成してください。

## 関連項目

<CardGroup cols={2}>
  <Card title="Admin APIキーの作成" href="https://platform.claude.com/docs/ja/manage-claude/admin-api-keys">
    プライマリオーナーがスコープ付きキーを作成する場所と、選択すべきスコープ。
  </Card>

  <Card title="Compliance API" href="https://platform.claude.com/docs/ja/manage-claude/compliance-api">
    組織全体のアクティビティを監査し、ユーザーコンテンツを取得または削除します。
  </Card>

  <Card title="Analytics API" href="https://platform.claude.com/docs/ja/manage-claude/analytics-api">
    Claude Enterprise向けのユーザーごとおよび時間バケットごとの使用量とコストのレポート。
  </Card>

  <Card title="Spend Limits API" href="https://platform.claude.com/docs/ja/manage-claude/spend-limits-api">
    メンバーごとの支出制限を設定し、引き上げリクエストを確認します。
  </Card>
</CardGroup>
