Users
class Users extends Resource (View source)
The "users" collection of methods.
Typical usage is:
$adminService = new Google\Service\Directory(...);
$users = $adminService->users;
Methods
Deletes a user. (users.delete)
Creates a user. Mutate calls immediately following user creation might
sometimes fail as the user isn't fully created due to propagation delay in
our backends. Check the error details for the "User creation is not complete"
message to see if this is the case. Retrying the calls after some time can
help in this case. If resolveConflictAccount
is set to true
, a 202
response code means that a conflicting unmanaged account exists and was
invited to join the organization. A 409
response code means that a
conflicting account exists so the user wasn't created based on the handling
unmanaged user accounts option
selected. (users.insert)
Retrieves a paginated list of either deleted users or all users in a domain.
Makes a user a super administrator. (users.makeAdmin)
Signs a user out of all web and device sessions and reset their sign-in cookies. User will have to sign in by authenticating again. (users.signOut)
Undeletes a deleted user. (users.undelete)
Updates a user. This method supports patch semantics, meaning that you only
need to include the fields you wish to update. Fields that are not present in
the request will be preserved, and fields set to null
will be cleared. For
repeating fields that contain arrays, individual items in the array can't be
patched piecemeal; they must be supplied in the request body with the desired
values for all items. See the user accounts
guide for more information. (users.update)
Details
delete(string $userKey, array $optParams = [])
Deletes a user. (users.delete)
User
get(string $userKey, array $optParams = [])
Retrieves a user. (users.get)
User
insert(User $postBody, array $optParams = [])
Creates a user. Mutate calls immediately following user creation might
sometimes fail as the user isn't fully created due to propagation delay in
our backends. Check the error details for the "User creation is not complete"
message to see if this is the case. Retrying the calls after some time can
help in this case. If resolveConflictAccount
is set to true
, a 202
response code means that a conflicting unmanaged account exists and was
invited to join the organization. A 409
response code means that a
conflicting account exists so the user wasn't created based on the handling
unmanaged user accounts option
selected. (users.insert)
Users
listUsers(array $optParams = [])
Retrieves a paginated list of either deleted users or all users in a domain.
(users.listUsers)
makeAdmin(string $userKey, UserMakeAdmin $postBody, array $optParams = [])
Makes a user a super administrator. (users.makeAdmin)
User
patch(string $userKey, User $postBody, array $optParams = [])
Updates a user using patch semantics. The update method should be used instead, because it also supports patch semantics and has better performance.
If you're mapping an external identity to a Google identity, use the
update
method instead of the patch
method. This method is unable to clear fields that contain repeated objects
(addresses
, phones
, etc). Use the update method instead. (users.patch)
signOut(string $userKey, array $optParams = [])
Signs a user out of all web and device sessions and reset their sign-in cookies. User will have to sign in by authenticating again. (users.signOut)
undelete(string $userKey, UserUndelete $postBody, array $optParams = [])
Undeletes a deleted user. (users.undelete)
User
update(string $userKey, User $postBody, array $optParams = [])
Updates a user. This method supports patch semantics, meaning that you only
need to include the fields you wish to update. Fields that are not present in
the request will be preserved, and fields set to null
will be cleared. For
repeating fields that contain arrays, individual items in the array can't be
patched piecemeal; they must be supplied in the request body with the desired
values for all items. See the user accounts
guide for more information. (users.update)