---
title: "removeCredentialIdentities(_:completion:)"
framework: authenticationservices
role: symbol
role_heading: Instance Method
path: "authenticationservices/ascredentialidentitystore/removecredentialidentities(_:completion:)-2ygnf"
---

# removeCredentialIdentities(_:completion:)

Removes the given credential identities from the store.

## Declaration

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

```swift
func removeCredentialIdentities(_ credentialIdentities: [ASPasswordCredentialIdentity]) async throws
```

## Parameters

- `credentialIdentities`: An array of doc://com.apple.authenticationservices/documentation/AuthenticationServices/ASPasswordCredentialIdentity objects to remove from the store.
- `completion`: An optional completion handler called after removing the credential identities. If the operation fails, an error with domain doc://com.apple.authenticationservices/documentation/AuthenticationServices/ASCredentialIdentityStoreErrorDomain is provided and none of the objects in credentialIdentities is removed from the store.

## Discussion

Discussion Use this method only if the store supports incremental updates to remove previously added credentials to the store.

## See Also

### Deprecated methods

- [saveCredentialIdentities(_:completion:)](authenticationservices/ascredentialidentitystore/savecredentialidentities(_:completion:)-5vs4m.md)
- [replaceCredentialIdentities(with:completion:)](authenticationservices/ascredentialidentitystore/replacecredentialidentities(with:completion:).md)
