Interface UserServiceAsync
-
- All Implemented Interfaces:
public interface UserServiceAsync
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceUserServiceAsync.WithRawResponseA view of UserServiceAsync that provides access to raw HTTP responses for each method.
-
Method Summary
-
-
Method Detail
-
withRawResponse
abstract UserServiceAsync.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
abstract UserServiceAsync withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
retrieve
CompletableFuture<BetaOrganizationUser> retrieve(String userId)
Retrieve a member of the organization by user ID.
-
retrieve
CompletableFuture<BetaOrganizationUser> retrieve(String userId, UserRetrieveParams params, RequestOptions requestOptions)
-
retrieve
CompletableFuture<BetaOrganizationUser> retrieve(String userId, UserRetrieveParams params)
-
retrieve
abstract CompletableFuture<BetaOrganizationUser> retrieve(UserRetrieveParams params, RequestOptions requestOptions)
-
retrieve
CompletableFuture<BetaOrganizationUser> retrieve(UserRetrieveParams params)
-
retrieve
CompletableFuture<BetaOrganizationUser> retrieve(String userId, RequestOptions requestOptions)
-
update
CompletableFuture<BetaOrganizationUser> update(String userId, UserUpdateParams params)
Update a member's organization role.
-
update
CompletableFuture<BetaOrganizationUser> update(String userId, UserUpdateParams params, RequestOptions requestOptions)
-
update
CompletableFuture<BetaOrganizationUser> update(UserUpdateParams params)
-
update
abstract CompletableFuture<BetaOrganizationUser> update(UserUpdateParams params, RequestOptions requestOptions)
-
list
CompletableFuture<UserListPageAsync> list()
List the organization's members.
-
list
abstract CompletableFuture<UserListPageAsync> list(UserListParams params, RequestOptions requestOptions)
-
list
CompletableFuture<UserListPageAsync> list(UserListParams params)
-
list
CompletableFuture<UserListPageAsync> list(RequestOptions requestOptions)
-
remove
CompletableFuture<UserRemoveResponse> remove(String userId)
Remove a member from the organization.
-
remove
CompletableFuture<UserRemoveResponse> remove(String userId, UserRemoveParams params, RequestOptions requestOptions)
-
remove
CompletableFuture<UserRemoveResponse> remove(String userId, UserRemoveParams params)
-
remove
abstract CompletableFuture<UserRemoveResponse> remove(UserRemoveParams params, RequestOptions requestOptions)
-
remove
CompletableFuture<UserRemoveResponse> remove(UserRemoveParams params)
-
remove
CompletableFuture<UserRemoveResponse> remove(String userId, RequestOptions requestOptions)
-
signOut
CompletableFuture<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
CompletableFuture<BetaOrganizationUser> signOut(String userId, UserSignOutParams params, RequestOptions requestOptions)
-
signOut
CompletableFuture<BetaOrganizationUser> signOut(String userId, UserSignOutParams params)
-
signOut
abstract CompletableFuture<BetaOrganizationUser> signOut(UserSignOutParams params, RequestOptions requestOptions)
-
signOut
CompletableFuture<BetaOrganizationUser> signOut(UserSignOutParams params)
-
signOut
CompletableFuture<BetaOrganizationUser> signOut(String userId, RequestOptions requestOptions)
-
-
-
-