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

# discoverUserIdentitiesCompletionBlock

The closure to execute when the operation finishes.

```
var discoverUserIdentitiesCompletionBlock: (((any Error)?) -> Void)? { get set }
```

## Discussion

The closure doesn’t return a value and takes the following parameter:

- An error if a problem occurs, or `nil` if CloudKit successfully fetches the user identities.

This closure executes only once, after all of the individual discovery closures finish. The closure executes serially with respect to the operation’s other closures. If you intend to use this closure to process results, update the property’s value before you execute the operation or submit it to a queue.

---

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)