<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CloudKitJS",
  "identifier" : "/documentation/CloudKitJS/CloudKit.Container/fetchCurrentUserIdentity",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CloudKit JS"
    ],
    "preciseIdentifier" : "instm/CloudKit.Container/fetchCurrentUserIdentity"
  },
  "title" : "fetchCurrentUserIdentity"
}
-->

# fetchCurrentUserIdentity

Fetches information about the current user asynchronously.

```
Promise<CloudKit.UserIdentity, CloudKit.CKError> fetchCurrentUserIdentity();
```

## Return Value

A `Promise` object that resolves to a [`CloudKit.UserIdentity`](/documentation/CloudKitJS/CloudKit.UserIdentity) dictionary if the current user is found, or rejects to a [`CKError`](/documentation/CloudKitJS/CloudKit/CKError) object.

## Discussion

If the current user is discoverable, the [`CloudKit.UserIdentity`](/documentation/CloudKitJS/CloudKit.UserIdentity) dictionary contains a `nameComponents` key that you can use to get the user’s first and last name.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)