Claude Platform Docs

Sign Out User

$client->beta->organization->users->signOut(string userID, ?list<AnthropicBeta> betas): OrganizationUser
POST/v1/organizations/users/{user_id}/sign_out
Requires anthropic-beta: admin-user-sign-out-2026-10-08. Learn how to send beta headers.

Sign a member out of Claude everywhere, without removing them from the organization. This ends their sign-in sessions and removes their trusted devices wherever they use Claude, including other organizations and individual plans. It also ends the OAuth tokens issued to them for this organization, so apps such as Claude Code must sign in again.

A token can take up to an hour to stop working, though it almost always stops at once. The member keeps their role and can sign in again right away. To keep them out, remove them from the organization or, if your organization uses single sign-on, block them in your identity provider. Signing out does not end API keys, OAuth tokens that were not issued for this organization, or the member's Claude Code cloud sessions and routines.

You cannot sign out the organization's primary owner or the person your API key or token acts for, and a request to sign out another owner, a member with owner permissions, or a membership admin may be refused. A refused request returns a 400 or 403 error that says why. If the request returns 503, send it again to finish; anything already ended stays ended.

Every request must include the beta header anthropic-beta: admin-user-sign-out-2026-10-08. A request without it returns 400. Sign-out is in beta for Claude Enterprise organizations. In an organization where it is not enabled, a request returns 400 with error_code organization_not_enrolled_in_beta. In a Claude Enterprise organization, an API key needs the write:members scope; a key without it gets 403.

Parameters
userID: string⁠Path parameter

ID of the User.

betas?: optional list<AnthropicBeta>⁠Header parameter

This endpoint is in beta: requests must send admin-user-sign-out-2026-10-08 in this header.

Returns
class OrganizationUser { $type = 'user'; $id; $addedAt; /* 3 more */ }
"user" type

Object type.

For Users, this is always "user".

string id

ID of the User.

\Datetime addedAt

RFC 3339 datetime string indicating when the User joined the Organization.

string email

Email of the User.

string name

Name of the User.

Organization role of the User.

Errors

Any method can also return the general HTTP errors.

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

CannotSignOutSelfExceptionHTTP status 400error code cannot_sign_out_self

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

BetaOrganizationNotEnrolledInBetaExceptionHTTP status 400error code organization_not_enrolled_in_beta

The beta that the endpoint requires is not enabled for the organization. The message names the beta value.

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

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

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

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

SandboxEgressRestrictedExceptionHTTP status 403error code sandbox_egress_restricted

The request came from a Claude sandbox with restricted network access, which is not allowed to make this request. Send it from outside the sandbox, or from a sandbox with unrestricted network access.

Sign Out User
<?php

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

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;

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

$betaOrganizationUser = $client->beta->organization->users->signOut(
  'user_id', betas: [AnthropicBeta::COMPUTER_USE_2024_10_22]
);

var_dump($betaOrganizationUser);
Returns Examples
Response 200
{
  "id": "user_01WxYzAbCdEfGhJkMnPqRsTu",
  "added_at": "2024-10-30T23:58:27.427722Z",
  "email": "user@emaildomain.com",
  "name": "Jane Doe",
  "role": "admin",
  "type": "user"
}