使用者
登出使用者
anthropic-beta: admin-user-sign-out-2026-10-08. Learn how to send beta headers.將成員從其使用 Claude 的所有地方登出,而不會將其從組織中移除。這會結束其登入工作階段,並移除其在任何使用 Claude 之處的受信任裝置,包括其他組織和個人方案。這也會終止為此組織核發給他們的 OAuth 權杖,因此 Claude Code 等應用程式必須重新登入。
Models
BetaCannotSignOutManagedMemberErrorDetails object{ error_code }
BetaCannotSignOutMembershipAdminErrorDetails object{ error_code }
BetaCannotSignOutOwnerErrorDetails object{ error_code }
BetaCannotSignOutPrimaryOwnerErrorDetails object{ error_code }
BetaCannotSignOutPrivilegedMemberErrorDetails object{ error_code }
BetaCannotSignOutSelfErrorDetails object{ error_code }
BetaOrganizationUser object{ type: "user", id, added_at, 3 more }
type: "user"Object type.
Object type.
For Users, this is always "user".
ID of the User.
added_at: stringRFC 3339 datetime string indicating when the User joined the Organization.
RFC 3339 datetime string indicating when the User joined the Organization.
Email of the User.
Name of the User.
role: BetaOrganizationRoleOrganization role of the User.
Organization role of the User.
UserRemoveResponse object{ type: "user_deleted", id }
type: "user_deleted"Deleted object type.
Deleted object type.
For Users, this is always "user_deleted".
ID of the User.
Errors
HTTP status 400error_code: "cannot_sign_out_primary_owner"The member is the organization's primary owner, whom no API key or token can sign out.
The member is the organization's primary owner, whom no API key or token can sign out.
details: BetaCannotSignOutPrimaryOwnerErrorDetails { error_code }
HTTP status 400error_code: "cannot_sign_out_self"The member is the user the API key or token belongs to.
The member is the user the API key or token belongs to.
details: BetaCannotSignOutSelfErrorDetails { error_code }
HTTP status 403error_code: "cannot_sign_out_managed_member"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.
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: BetaCannotSignOutManagedMemberErrorDetails { error_code }
HTTP status 403error_code: "cannot_sign_out_membership_admin"The member is a membership admin, and the person the API key or token belongs to is not allowed to sign out membership admins.
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: BetaCannotSignOutMembershipAdminErrorDetails { error_code }
HTTP status 403error_code: "cannot_sign_out_owner"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.
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: BetaCannotSignOutOwnerErrorDetails { error_code }
HTTP status 403error_code: "cannot_sign_out_privileged_member"This OAuth token cannot sign out a membership admin or a member whose roles grant owner, user management, or identity and access management.
This OAuth token cannot sign out a membership admin or a member whose roles grant owner, user management, or identity and access management.