<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASCredentialIdentityStore/saveCredentialIdentities(_:completion:)-1bbx6",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:objc(cs)ASCredentialIdentityStore(im)saveCredentialIdentityEntries:completion:"
  },
  "title" : "saveCredentialIdentities(_:completion:)"
}
-->

# saveCredentialIdentities(_:completion:)

Save the supplied credential identities to the store.

```
func saveCredentialIdentities(_ credentialIdentities: [any ASCredentialIdentity], completion: (@Sendable (Bool, (any Error)?) -> Void)? = nil)
```

```
func saveCredentialIdentities(_ credentialIdentities: [any ASCredentialIdentity]) async throws
```

## Parameters

`credentialIdentities`

A list of credential identities to save.

`completion`

An optional completion handler that runs when the operation finishes.

## Discussion

Call this method if the credential store supports incremental updates to add new credential identities. Otherwise, call this method passing all credential identities. If any of the credential identities in the `credentialIdentities` array already exist in the store, this method overwrites them with the values in the array.

On failure, this method calls the callback with an error with domain [`ASCredentialIdentityStoreErrorDomain`](/documentation/AuthenticationServices/ASCredentialIdentityStoreErrorDomain) and doesn’t save any of the objects in `credentialIdentities` to the store.

---

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)