Interface UserService
-
- All Implemented Interfaces:
public interface UserService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceUserService.WithRawResponseA view of UserService that provides access to raw HTTP responses for each method.
-
Method Summary
-
-
Method Detail
-
withRawResponse
abstract UserService.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
abstract UserService withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
retrieve
BetaOrganizationUser retrieve(String userId)
Retrieve a member of the organization by user ID.
-
retrieve
BetaOrganizationUser retrieve(String userId, UserRetrieveParams params, RequestOptions requestOptions)
-
retrieve
BetaOrganizationUser retrieve(String userId, UserRetrieveParams params)
-
retrieve
abstract BetaOrganizationUser retrieve(UserRetrieveParams params, RequestOptions requestOptions)
-
retrieve
BetaOrganizationUser retrieve(UserRetrieveParams params)
-
retrieve
BetaOrganizationUser retrieve(String userId, RequestOptions requestOptions)
-
update
BetaOrganizationUser update(String userId, UserUpdateParams params)
Update a member's organization role.
-
update
BetaOrganizationUser update(String userId, UserUpdateParams params, RequestOptions requestOptions)
-
update
BetaOrganizationUser update(UserUpdateParams params)
-
update
abstract BetaOrganizationUser update(UserUpdateParams params, RequestOptions requestOptions)
-
list
UserListPage list()
List the organization's members.
-
list
abstract UserListPage list(UserListParams params, RequestOptions requestOptions)
-
list
UserListPage list(UserListParams params)
-
list
UserListPage list(RequestOptions requestOptions)
-
remove
UserRemoveResponse remove(String userId)
Remove a member from the organization.
-
remove
UserRemoveResponse remove(String userId, UserRemoveParams params, RequestOptions requestOptions)
-
remove
UserRemoveResponse remove(String userId, UserRemoveParams params)
-
remove
abstract UserRemoveResponse remove(UserRemoveParams params, RequestOptions requestOptions)
-
remove
UserRemoveResponse remove(UserRemoveParams params)
-
remove
UserRemoveResponse remove(String userId, RequestOptions requestOptions)
-
signOut
BetaOrganizationUser signOut(String userId)
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
400or403error that says why. If the request returns503, 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 returns400. Sign-out is in beta for Claude Enterprise organizations. In an organization where it is not enabled, a request returns400witherror_codeorganization_not_enrolled_in_beta. In a Claude Enterprise organization, an API key needs thewrite:membersscope; a key without it gets403.
-
signOut
BetaOrganizationUser signOut(String userId, UserSignOutParams params, RequestOptions requestOptions)
-
signOut
BetaOrganizationUser signOut(String userId, UserSignOutParams params)
-
signOut
abstract BetaOrganizationUser signOut(UserSignOutParams params, RequestOptions requestOptions)
-
signOut
BetaOrganizationUser signOut(UserSignOutParams params)
-
signOut
BetaOrganizationUser signOut(String userId, RequestOptions requestOptions)
-
-
-
-