Claude Platform Docs

使用者

列出使用者
$ ant beta:organization:users list
GET/v1/organizations/users

列出組織的成員。

取得使用者
$ ant beta:organization:users retrieve
GET/v1/organizations/users/{user_id}

依使用者 ID 擷取組織成員。

更新使用者
$ ant beta:organization:users update
POST/v1/organizations/users/{user_id}

更新成員的組織角色。

移除使用者
$ ant beta:organization:users remove
DELETE/v1/organizations/users/{user_id}

從組織中移除成員。

登出使用者
$ ant beta:organization:users sign-out
POST/v1/organizations/users/{user_id}/sign_out
Requires anthropic-beta: admin-user-sign-out-2026-10-08. Learn how to send beta headers.

將成員從其使用 Claude 的所有地方登出,而不會將其從組織中移除。這會結束其登入工作階段,並移除其在任何使用 Claude 之處的受信任裝置,包括其他組織和個人方案。這也會終止為此組織核發給他們的 OAuth 權杖,因此 Claude Code 等應用程式必須重新登入。

Models
beta_cannot_sign_out_managed_member_error_details: object{ error_code }
error_code: "cannot_sign_out_managed_member"
beta_cannot_sign_out_membership_admin_error_details: object{ error_code }
error_code: "cannot_sign_out_membership_admin"
beta_cannot_sign_out_owner_error_details: object{ error_code }
error_code: "cannot_sign_out_owner"
beta_cannot_sign_out_primary_owner_error_details: object{ error_code }
error_code: "cannot_sign_out_primary_owner"
beta_cannot_sign_out_privileged_member_error_details: object{ error_code }
error_code: "cannot_sign_out_privileged_member"
beta_cannot_sign_out_self_error_details: object{ error_code }
error_code: "cannot_sign_out_self"
beta_organization_user: object{ type: "user", id, added_at, 3 more }
Errors
"cannot_sign_out_primary_owner"⁠HTTP status 400

The member is the organization's primary owner, whom no API key or token can sign out.

details: object{ error_code }
error_code: "cannot_sign_out_primary_owner"
"cannot_sign_out_self"⁠HTTP status 400

The member is the user the API key or token belongs to.

details: object{ error_code }
error_code: "cannot_sign_out_self"
"cannot_sign_out_managed_member"⁠HTTP status 403

The member has the managed role, and this API key or token cannot sign them out. The error message says which keys and tokens can.

details: object{ error_code }
error_code: "cannot_sign_out_managed_member"
"cannot_sign_out_membership_admin"⁠HTTP status 403

The member is a membership admin, and the person the API key or token belongs to is not allowed to sign out membership admins.

details: object{ error_code }
error_code: "cannot_sign_out_membership_admin"
"cannot_sign_out_owner"⁠HTTP status 403

The member is an owner or has owner permissions, and this API key or token cannot sign them out. In a Claude Enterprise organization, an API key with the write:members scope can.

details: object{ error_code }
error_code: "cannot_sign_out_owner"
"cannot_sign_out_privileged_member"⁠HTTP status 403

This OAuth token cannot sign out a membership admin or a member whose roles grant owner, user management, or identity and access management.

details: object{ error_code }
error_code: "cannot_sign_out_privileged_member"