<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKUserIdentity",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKUserIdentity"
  },
  "title" : "CKUserIdentity"
}
-->

# CKUserIdentity

The identity of a user.

```
class CKUserIdentity
```

## Overview

A user identity provides identifiable data about an iCloud user, including their name, user record ID, and an email address or phone number. CloudKit retrieves this information from the user’s iCloud account. A user must give their consent to be discoverable before CloudKit can provide this data to your app. For more information, see [`requestApplicationPermission(_:completionHandler:)`](/documentation/CloudKit/CKContainer/requestApplicationPermission(_:completionHandler:)).

You don’t create instances of this class. Instead, CloudKit provides them in certain contexts. A share’s owner has a user identity, as does each of its participants. When creating participants, CloudKit tries to find iCloud accounts it can use to populate their identities. If CloudKit doesn’t find an account, it sets the identity’s [`hasiCloudAccount`](/documentation/CloudKit/CKUserIdentity/hasiCloudAccount) property to <doc://com.apple.documentation/documentation/Swift/false>.

You can also discover the identities of your app’s users by executing one of the user discovery operations: [`CKDiscoverAllUserIdentitiesOperation`](/documentation/CloudKit/CKDiscoverAllUserIdentitiesOperation) and [`CKDiscoverUserIdentitiesOperation`](/documentation/CloudKit/CKDiscoverUserIdentitiesOperation). Identities that CloudKit discovers using [`CKDiscoverAllUserIdentitiesOperation`](/documentation/CloudKit/CKDiscoverAllUserIdentitiesOperation) correspond to entries in the device’s Contacts database. These identities contain the identifiers of their Contact records, which you can use to fetch those records from the Contacts database. For more information, see [`contactIdentifiers`](/documentation/CloudKit/CKUserIdentity/contactIdentifiers).

## Topics

### Accessing iCloud Information

[`hasiCloudAccount`](/documentation/CloudKit/CKUserIdentity/hasiCloudAccount)

A Boolean value that indicates whether the user has an iCloud account.

[`lookupInfo`](/documentation/CloudKit/CKUserIdentity/lookupInfo-swift.property)

The lookup info for retrieving the user identity.

[`CKUserIdentity.LookupInfo`](/documentation/CloudKit/CKUserIdentity/LookupInfo-swift.class)

The criteria to use when searching for discoverable iCloud users.

### Accessing User Information

[`userRecordID`](/documentation/CloudKit/CKUserIdentity/userRecordID)

The user record ID for the corresponding user record.

[`contactIdentifiers`](/documentation/CloudKit/CKUserIdentity/contactIdentifiers)

Identifiers that match contacts in the local Contacts database.

[`nameComponents`](/documentation/CloudKit/CKUserIdentity/nameComponents)

The user’s 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)