> Documentation index: [Saleor](/llms.txt) · [This section](/api-reference/users/llms.txt)
> Source: https://docs.saleor.io/api-reference/users/objects/user

# User Object

Represents user data.

```graphql
type User implements Node, ObjectWithMetadata, ObjectWithAttributes {
  id: ID!
  privateMetadata: [MetadataItem!]!
  privateMetafield(
    key: String!
  ): String
  privateMetafields(
    keys: [String!]
  ): Metadata
  metadata: [MetadataItem!]!
  metafield(
    key: String!
  ): String
  metafields(
    keys: [String!]
  ): Metadata
  assignedAttribute(
    slug: String!
  ): AssignedAttribute
  assignedAttributes(
    limit: PositiveInt = 100
  ): [AssignedAttribute!]!
  email: String!
  firstName: String!
  lastName: String!
  isStaff: Boolean!
  isActive: Boolean!
  isConfirmed: Boolean!
  addresses: [Address!]!
  checkout: Checkout @deprecated
  checkoutTokens(
    channel: String
  ): [UUID!] @deprecated
  checkoutIds(
    channel: String
  ): [ID!]
  checkouts(
    channel: String
    before: String
    after: String
    first: Int
    last: Int
  ): CheckoutCountableConnection
  giftCards(
    before: String
    after: String
    first: Int
    last: Int
  ): GiftCardCountableConnection
  note: String
  orders(
    where: CustomerOrderWhereInput
    before: String
    after: String
    first: Int
    last: Int
  ): OrderCountableConnection
  userPermissions: [UserPermission!]
  permissionGroups: [Group!]
  editableGroups: [Group!]
  accessibleChannels: [Channel!]
  restrictedAccessToChannels: Boolean!
  avatar(
    size: Int
    format: ThumbnailFormatEnum = ORIGINAL
  ): Image
  events: [CustomerEvent!]
  storedPaymentSources(
    channel: String
  ): [PaymentSource!] @deprecated
  languageCode: LanguageCodeEnum!
  defaultShippingAddress: Address
  defaultBillingAddress: Address
  externalReference: String
  customerType: CustomerType
  lastLogin: DateTime
  dateJoined: DateTime!
  updatedAt: DateTime!
  storedPaymentMethods(
    channel: String!
  ): [StoredPaymentMethod!]
}
```

<a id="fields"></a>

### Fields

<a id="id"></a>

#### [`id`](#id) ● [`ID!`](/api-reference/miscellaneous/scalars/id.md)

The ID of the user.

<a id="private-metadata"></a>

#### [`privateMetadata`](#private-metadata) ● [`[MetadataItem!]!`](/api-reference/miscellaneous/objects/metadata-item.md)

List of private metadata items. Requires staff permissions to access.

<a id="private-metafield"></a>

#### [`privateMetafield`](#private-metafield) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

A single key from private metadata. Requires staff permissions to access.

Tip: Use GraphQL aliases to fetch multiple keys.

<a id="user-private-metafield-key"></a>

##### [`key`](#user-private-metafield-key) ● [`String!`](/api-reference/miscellaneous/scalars/string.md)

<a id="private-metafields"></a>

#### [`privateMetafields`](#private-metafields) ● [`Metadata`](/api-reference/miscellaneous/scalars/metadata.md)

Private metadata. Requires staff permissions to access. Use `keys` to control which fields you want to include. The default is to include everything.

<a id="user-private-metafields-keys"></a>

##### [`keys`](#user-private-metafields-keys) ● [`[String!]`](/api-reference/miscellaneous/scalars/string.md)

<a id="metadata"></a>

#### [`metadata`](#metadata) ● [`[MetadataItem!]!`](/api-reference/miscellaneous/objects/metadata-item.md)

List of public metadata items. Can be accessed without permissions.

<a id="metafield"></a>

#### [`metafield`](#metafield) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

A single key from public metadata.

Tip: Use GraphQL aliases to fetch multiple keys.

<a id="user-metafield-key"></a>

##### [`key`](#user-metafield-key) ● [`String!`](/api-reference/miscellaneous/scalars/string.md)

<a id="metafields"></a>

#### [`metafields`](#metafields) ● [`Metadata`](/api-reference/miscellaneous/scalars/metadata.md)

Public metadata. Use `keys` to control which fields you want to include. The default is to include everything.

<a id="user-metafields-keys"></a>

##### [`keys`](#user-metafields-keys) ● [`[String!]`](/api-reference/miscellaneous/scalars/string.md)

<a id="assigned-attribute"></a>

#### [`assignedAttribute`](#assigned-attribute) ● [`AssignedAttribute`](/api-reference/attributes/interfaces/assigned-attribute.md)

Get a single attribute assigned to the user by attribute slug. The attribute is looked up among the attributes of the user's customer type.

Requires one of the following permissions: MANAGE\_USERS OWNER

The owner can access only attributes that are visible in the storefront.

Added in Saleor 3.23

<a id="user-assigned-attribute-slug"></a>

##### [`slug`](#user-assigned-attribute-slug) ● [`String!`](/api-reference/miscellaneous/scalars/string.md)

Slug of the attribute

<a id="assigned-attributes"></a>

#### [`assignedAttributes`](#assigned-attributes) ● [`[AssignedAttribute!]!`](/api-reference/attributes/interfaces/assigned-attribute.md)

List of attributes assigned to the user through the user's customer type.

Requires one of the following permissions: MANAGE\_USERS OWNER

The owner can access only attributes that are visible in the storefront.

Added in Saleor 3.23

<a id="user-assigned-attributes-limit"></a>

##### [`limit`](#user-assigned-attributes-limit) ● [`PositiveInt`](/api-reference/miscellaneous/scalars/positive-int.md)

Maximum number of attributes to return. Default is 100.

<a id="email"></a>

#### [`email`](#email) ● [`String!`](/api-reference/miscellaneous/scalars/string.md)

The email address of the user.

<a id="first-name"></a>

#### [`firstName`](#first-name) ● [`String!`](/api-reference/miscellaneous/scalars/string.md)

The given name of the address.

<a id="last-name"></a>

#### [`lastName`](#last-name) ● [`String!`](/api-reference/miscellaneous/scalars/string.md)

The family name of the address.

<a id="is-staff"></a>

#### [`isStaff`](#is-staff) ● [`Boolean!`](/api-reference/miscellaneous/scalars/boolean.md)

Determine if the user is a staff admin.

<a id="is-active"></a>

#### [`isActive`](#is-active) ● [`Boolean!`](/api-reference/miscellaneous/scalars/boolean.md)

Determine if the user is active.

<a id="is-confirmed"></a>

#### [`isConfirmed`](#is-confirmed) ● [`Boolean!`](/api-reference/miscellaneous/scalars/boolean.md)

Determines if user has confirmed email.

<a id="addresses"></a>

#### [`addresses`](#addresses) ● [`[Address!]!`](/api-reference/users/objects/address.md)

List of all user's addresses.

<a id="checkout-ids"></a>

#### [`checkoutIds`](#checkout-ids) ● [`[ID!]`](/api-reference/miscellaneous/scalars/id.md)

Returns the checkout ID's assigned to this user.

<a id="user-checkout-ids-channel"></a>

##### [`channel`](#user-checkout-ids-channel) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Slug of a channel for which the data should be returned.

<a id="checkouts"></a>

#### [`checkouts`](#checkouts) ● [`CheckoutCountableConnection`](/api-reference/checkout/objects/checkout-countable-connection.md)

Returns checkouts assigned to this user. The query will not initiate any external requests, including fetching external shipping methods, filtering available shipping methods, or performing external tax calculations.

<a id="user-checkouts-channel"></a>

##### [`channel`](#user-checkouts-channel) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Slug of a channel for which the data should be returned.

<a id="user-checkouts-before"></a>

##### [`before`](#user-checkouts-before) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Return the elements in the list that come before the specified cursor.

<a id="user-checkouts-after"></a>

##### [`after`](#user-checkouts-after) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Return the elements in the list that come after the specified cursor.

<a id="user-checkouts-first"></a>

##### [`first`](#user-checkouts-first) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

<a id="user-checkouts-last"></a>

##### [`last`](#user-checkouts-last) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

<a id="gift-cards"></a>

#### [`giftCards`](#gift-cards) ● [`GiftCardCountableConnection`](/api-reference/gift-cards/objects/gift-card-countable-connection.md)

List of the user gift cards.

<a id="user-gift-cards-before"></a>

##### [`before`](#user-gift-cards-before) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Return the elements in the list that come before the specified cursor.

<a id="user-gift-cards-after"></a>

##### [`after`](#user-gift-cards-after) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Return the elements in the list that come after the specified cursor.

<a id="user-gift-cards-first"></a>

##### [`first`](#user-gift-cards-first) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

<a id="user-gift-cards-last"></a>

##### [`last`](#user-gift-cards-last) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

<a id="note"></a>

#### [`note`](#note) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

A note about the customer.

Requires one of the following permissions: MANAGE\_USERS MANAGE\_STAFF

<a id="orders"></a>

#### [`orders`](#orders) ● [`OrderCountableConnection`](/api-reference/orders/objects/order-countable-connection.md)

List of user's orders. The query will not initiate any external requests, including filtering available shipping methods, or performing external tax calculations.

Requires one of the following permissions: MANAGE\_STAFF OWNER

<a id="user-orders-where"></a>

##### [`where`](#user-orders-where) ● [`CustomerOrderWhereInput`](/api-reference/orders/inputs/customer-order-where-input.md)

Where filtering options for orders.

Added in Saleor 3.22

<a id="user-orders-before"></a>

##### [`before`](#user-orders-before) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Return the elements in the list that come before the specified cursor.

<a id="user-orders-after"></a>

##### [`after`](#user-orders-after) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Return the elements in the list that come after the specified cursor.

<a id="user-orders-first"></a>

##### [`first`](#user-orders-first) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Retrieve the first n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

<a id="user-orders-last"></a>

##### [`last`](#user-orders-last) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Retrieve the last n elements from the list. Note that the system only allows fetching a maximum of 100 objects in a single query.

<a id="user-permissions"></a>

#### [`userPermissions`](#user-permissions) ● [`[UserPermission!]`](/api-reference/users/objects/user-permission.md)

List of user's permissions.

<a id="permission-groups"></a>

#### [`permissionGroups`](#permission-groups) ● [`[Group!]`](/api-reference/users/objects/group.md)

List of user's permission groups.

<a id="editable-groups"></a>

#### [`editableGroups`](#editable-groups) ● [`[Group!]`](/api-reference/users/objects/group.md)

List of user's permission groups which user can manage.

<a id="accessible-channels"></a>

#### [`accessibleChannels`](#accessible-channels) ● [`[Channel!]`](/api-reference/channels/objects/channel.md)

List of channels the user has access to. The sum of channels from all user groups. If at least one group has `restrictedAccessToChannels` set to False - all channels are returned.

<a id="restricted-access-to-channels"></a>

#### [`restrictedAccessToChannels`](#restricted-access-to-channels) ● [`Boolean!`](/api-reference/miscellaneous/scalars/boolean.md)

Determine if user have restricted access to channels. False if at least one user group has `restrictedAccessToChannels` set to False.

<a id="avatar"></a>

#### [`avatar`](#avatar) ● [`Image`](/api-reference/miscellaneous/objects/image.md)

The avatar of the user.

<a id="user-avatar-size"></a>

##### [`size`](#user-avatar-size) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Desired longest side the image in pixels. Defaults to 4096. Images are never cropped. Pass 0 to retrieve the original size (not recommended).

<a id="user-avatar-format"></a>

##### [`format`](#user-avatar-format) ● [`ThumbnailFormatEnum`](/api-reference/miscellaneous/enums/thumbnail-format-enum.md)

The format of the image. When not provided, format of the original image will be used.

<a id="events"></a>

#### [`events`](#events) ● [`[CustomerEvent!]`](/api-reference/users/objects/customer-event.md)

List of events associated with the user.

Requires one of the following permissions: MANAGE\_USERS MANAGE\_STAFF

<a id="language-code"></a>

#### [`languageCode`](#language-code) ● [`LanguageCodeEnum!`](/api-reference/miscellaneous/enums/language-code-enum.md)

User language code.

<a id="default-shipping-address"></a>

#### [`defaultShippingAddress`](#default-shipping-address) ● [`Address`](/api-reference/users/objects/address.md)

The default shipping address of the user.

<a id="default-billing-address"></a>

#### [`defaultBillingAddress`](#default-billing-address) ● [`Address`](/api-reference/users/objects/address.md)

The default billing address of the user.

<a id="external-reference"></a>

#### [`externalReference`](#external-reference) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

External ID of this user.

<a id="customer-type"></a>

#### [`customerType`](#customer-type) ● [`CustomerType`](/api-reference/users/objects/customer-type.md)

The customer type assigned to the user.

Requires one of the following permissions: MANAGE\_USERS OWNER

Added in Saleor 3.23

<a id="last-login"></a>

#### [`lastLogin`](#last-login) ● [`DateTime`](/api-reference/miscellaneous/scalars/date-time.md)

The date when the user last time log in to the system.

<a id="date-joined"></a>

#### [`dateJoined`](#date-joined) ● [`DateTime!`](/api-reference/miscellaneous/scalars/date-time.md)

The data when the user create account.

<a id="updated-at"></a>

#### [`updatedAt`](#updated-at) ● [`DateTime!`](/api-reference/miscellaneous/scalars/date-time.md)

The data when the user last update the account information.

<a id="stored-payment-methods"></a>

#### [`storedPaymentMethods`](#stored-payment-methods) ● [`[StoredPaymentMethod!]`](/api-reference/payments/objects/stored-payment-method.md)

Returns a list of user's stored payment methods that can be used in provided channel. The field returns a list of stored payment methods by payment apps. When `amount` is not provided, 0 will be used as default value.

<a id="user-stored-payment-methods-channel"></a>

##### [`channel`](#user-stored-payment-methods-channel) ● [`String!`](/api-reference/miscellaneous/scalars/string.md)

Slug of a channel for which the data should be returned.

Show deprecatedHide deprecated

<a id="checkout"></a>

#### [`checkout`](#checkout) ● [`Checkout`](/api-reference/checkout/objects/checkout.md)

DEPRECATED

Use the `checkoutTokens` field to fetch the user checkouts.

Returns the last open checkout of this user.

<a id="checkout-tokens"></a>

#### [`checkoutTokens`](#checkout-tokens) ● [`[UUID!]`](/api-reference/miscellaneous/scalars/uuid.md)

DEPRECATED

Use `checkoutIds` instead.

Returns the checkout UUID's assigned to this user.

<a id="user-checkout-tokens-channel"></a>

##### [`channel`](#user-checkout-tokens-channel) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Slug of a channel for which the data should be returned.

<a id="stored-payment-sources"></a>

#### [`storedPaymentSources`](#stored-payment-sources) ● [`[PaymentSource!]`](/api-reference/payments/objects/payment-source.md)

DEPRECATED

The legacy Payments API is deprecated and will be removed. Use the Transactions API instead.

List of stored payment sources. The field returns a list of payment sources stored for payment plugins.

<a id="user-stored-payment-sources-channel"></a>

##### [`channel`](#user-stored-payment-sources-channel) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Slug of a channel for which the data should be returned.

<a id="interfaces"></a>

### Interfaces

<a id="node"></a>

#### [`Node`](/api-reference/miscellaneous/interfaces/node.md)

An object with an ID

<a id="objectwithmetadata"></a>

#### [`ObjectWithMetadata`](/api-reference/miscellaneous/interfaces/object-with-metadata.md)

<a id="objectwithattributes"></a>

#### [`ObjectWithAttributes`](/api-reference/attributes/interfaces/object-with-attributes.md)

An object with attributes.

Added in Saleor 3.22

<a id="returned-by"></a>

### Returned By

[`me`](/api-reference/users/queries/me.md) query  ● [`user`](/api-reference/users/queries/user.md) query

<a id="member-of"></a>

### Member Of

[`AccountAddressCreate`](/api-reference/users/objects/account-address-create.md) object  ● [`AccountAddressDelete`](/api-reference/users/objects/account-address-delete.md) object  ● [`AccountAddressUpdate`](/api-reference/users/objects/account-address-update.md) object  ● [`AccountChangeEmailRequested`](/api-reference/users/objects/account-change-email-requested.md) object  ● [`AccountConfirmationRequested`](/api-reference/users/objects/account-confirmation-requested.md) object  ● [`AccountConfirmed`](/api-reference/users/objects/account-confirmed.md) object  ● [`AccountDelete`](/api-reference/users/objects/account-delete.md) object  ● [`AccountDeleted`](/api-reference/users/objects/account-deleted.md) object  ● [`AccountDeleteRequested`](/api-reference/users/objects/account-delete-requested.md) object  ● [`AccountEmailChanged`](/api-reference/users/objects/account-email-changed.md) object  ● [`AccountRegister`](/api-reference/users/objects/account-register.md) object  ● [`AccountSetDefaultAddress`](/api-reference/users/objects/account-set-default-address.md) object  ● [`AccountSetPasswordRequested`](/api-reference/users/objects/account-set-password-requested.md) object  ● [`AccountUpdate`](/api-reference/users/objects/account-update.md) object  ● [`AddressCreate`](/api-reference/users/objects/address-create.md) object  ● [`AddressDelete`](/api-reference/users/objects/address-delete.md) object  ● [`AddressSetDefault`](/api-reference/users/objects/address-set-default.md) object  ● [`AddressUpdate`](/api-reference/users/objects/address-update.md) object  ● [`AppProblemDismissed`](/api-reference/miscellaneous/objects/app-problem-dismissed.md) object  ● [`Checkout`](/api-reference/checkout/objects/checkout.md) object  ● [`ConfirmAccount`](/api-reference/users/objects/confirm-account.md) object  ● [`ConfirmEmailChange`](/api-reference/users/objects/confirm-email-change.md) object  ● [`CreateToken`](/api-reference/authentication/objects/create-token.md) object  ● [`CustomerBulkResult`](/api-reference/users/objects/customer-bulk-result.md) object  ● [`CustomerCreate`](/api-reference/users/objects/customer-create.md) object  ● [`CustomerCreated`](/api-reference/users/objects/customer-created.md) object  ● [`CustomerDelete`](/api-reference/users/objects/customer-delete.md) object  ● [`CustomerDeleted`](/api-reference/users/objects/customer-deleted.md) object  ● [`CustomerEvent`](/api-reference/users/objects/customer-event.md) object  ● [`CustomerMetadataUpdated`](/api-reference/users/objects/customer-metadata-updated.md) object  ● [`CustomerUpdate`](/api-reference/users/objects/customer-update.md) object  ● [`CustomerUpdated`](/api-reference/users/objects/customer-updated.md) object  ● [`ExportEvent`](/api-reference/miscellaneous/objects/export-event.md) object  ● [`ExportFile`](/api-reference/miscellaneous/objects/export-file.md) object  ● [`ExternalObtainAccessTokens`](/api-reference/authentication/objects/external-obtain-access-tokens.md) object  ● [`ExternalRefresh`](/api-reference/authentication/objects/external-refresh.md) object  ● [`ExternalVerify`](/api-reference/authentication/objects/external-verify.md) object  ● [`GiftCard`](/api-reference/gift-cards/objects/gift-card.md) object  ● [`GiftCardEvent`](/api-reference/gift-cards/objects/gift-card-event.md) object  ● [`GiftCardEventAssignment`](/api-reference/gift-cards/objects/gift-card-event-assignment.md) object  ● [`Group`](/api-reference/users/objects/group.md) object  ● [`ListStoredPaymentMethods`](/api-reference/payments/objects/list-stored-payment-methods.md) object  ● [`Order`](/api-reference/orders/objects/order.md) object  ● [`OrderEvent`](/api-reference/orders/objects/order-event.md) object  ● [`OrderGrantedRefund`](/api-reference/orders/objects/order-granted-refund.md) object  ● [`PasswordChange`](/api-reference/users/objects/password-change.md) object  ● [`PaymentGatewayInitializeTokenizationSession`](/api-reference/payments/objects/payment-gateway-initialize-tokenization-session.md) object  ● [`PaymentMethodInitializeTokenizationSession`](/api-reference/payments/objects/payment-method-initialize-tokenization-session.md) object  ● [`PaymentMethodProcessTokenizationSession`](/api-reference/payments/objects/payment-method-process-tokenization-session.md) object  ● [`RefreshToken`](/api-reference/authentication/objects/refresh-token.md) object  ● [`RequestEmailChange`](/api-reference/users/objects/request-email-change.md) object  ● [`SetPassword`](/api-reference/users/objects/set-password.md) object  ● [`StaffCreate`](/api-reference/users/objects/staff-create.md) object  ● [`StaffCreated`](/api-reference/users/objects/staff-created.md) object  ● [`StaffDelete`](/api-reference/users/objects/staff-delete.md) object  ● [`StaffDeleted`](/api-reference/users/objects/staff-deleted.md) object  ● [`StaffNotificationRecipient`](/api-reference/miscellaneous/objects/staff-notification-recipient.md) object  ● [`StaffSetPasswordRequested`](/api-reference/users/objects/staff-set-password-requested.md) object  ● [`StaffUpdate`](/api-reference/users/objects/staff-update.md) object  ● [`StaffUpdated`](/api-reference/users/objects/staff-updated.md) object  ● [`StoredPaymentMethodDeleteRequested`](/api-reference/payments/objects/stored-payment-method-delete-requested.md) object  ● [`UserAvatarDelete`](/api-reference/users/objects/user-avatar-delete.md) object  ● [`UserAvatarUpdate`](/api-reference/users/objects/user-avatar-update.md) object  ● [`UserCountableEdge`](/api-reference/users/objects/user-countable-edge.md) object  ● [`VerifyToken`](/api-reference/authentication/objects/verify-token.md) object

<a id="implemented-by"></a>

### Implemented By

[`_Entity`](/api-reference/miscellaneous/unions/entity.md) union  ● [`IssuingPrincipal`](/api-reference/miscellaneous/unions/issuing-principal.md) union  ● [`UserOrApp`](/api-reference/miscellaneous/unions/user-or-app.md) union
