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.
[null,null,["Last updated 2024-08-22 UTC."],[[["`patch` updates a user using patch semantics, but the `update` method is recommended for better performance and support for patch semantics, especially for mapping external identities."],["When dealing with repeated object fields like addresses or phone numbers, the `update` method should be used instead of `patch` for effective clearing."],["This API endpoint utilizes an HTTP PATCH request to `https://admin.googleapis.com/admin/directory/v1/users/{userKey}`, allowing modification of user data using patch semantics."],["To use this endpoint, you'll need to include the user's primary email address, alias email address, or unique user ID as the `userKey` in the request path."],["Appropriate authorization with the `https://www.googleapis.com/auth/admin.directory.user` scope is necessary to access and modify user data via this API."]]],["The `PATCH` method updates a user, identified by `userKey` (email or ID), via an HTTP request to `https://admin.googleapis.com/admin/directory/v1/users/{userKey}`. It uses patch semantics and accepts a `User` object in the request body. The response is also a `User` object. This method cannot clear fields with repeated objects. `update` method is recommended for mapping external identities to Google identity, clearing repeated objects and performance. OAuth scope `https://www.googleapis.com/auth/admin.directory.user` is required.\n"]]