Get Current User Record

AVAILABLE API VERSION
API v66.0 and later

The currentUser type returns the currently logged-in user’s User record data, even if the caller doesn’t know the user ID. The response always represents the current user. You can request any fields that are available on the User record.

To query or aggregate multiple users or use complex filtering, sorting, or pagination, use the RecordQuery type for the User object instead. See Query Objects.

To get the current user record, use currentUser in the uiapi field.

Query currentUser by using this schema.

This example fetches the ID and name for the current user.

The response includes the fields that you request. For example, the previous query returns this response.