<!--
{
  "availability" : [
    "iOS: 12.0.0 - 17.0.0",
    "iPadOS: 12.0.0 - 17.0.0",
    "macCatalyst: 13.1.0 - 17.0.0",
    "macOS: 11.0.0 - 14.0.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASCredentialProviderViewController/provideCredentialWithoutUserInteraction(for:)-7jlg0",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:objc(cs)ASCredentialProviderViewController(im)provideCredentialWithoutUserInteractionForIdentity:"
  },
  "title" : "provideCredentialWithoutUserInteraction(for:)"
}
-->

# provideCredentialWithoutUserInteraction(for:)

Attempts to provide the user-requested credential with no further user interaction.

```
func provideCredentialWithoutUserInteraction(for credentialIdentity: ASPasswordCredentialIdentity)
```

## Parameters

`credentialIdentity`

The credential identity for which a credential should be provided.

## Discussion

When the user selects a credential identity from the QuickType bar, the system calls the [`provideCredentialWithoutUserInteraction(for:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/provideCredentialWithoutUserInteraction(for:)-7jlg0) method to ask your extension to provide the corresponding credential.

Call the context’s [`completeRequest(withSelectedCredential:completionHandler:)`](/documentation/AuthenticationServices/ASCredentialProviderExtensionContext/completeRequest(withSelectedCredential:completionHandler:)) method to provide the credential if the extension can do so without further user interaction. If not—for example, because the user must first unlock a password database—call the [`cancelRequest(withError:)`](/documentation/AuthenticationServices/ASCredentialProviderExtensionContext/cancelRequest(withError:)) method instead using an error with domain [`ASExtensionErrorDomain`](/documentation/AuthenticationServices/ASExtensionErrorDomain) and code [`userInteractionRequired`](/documentation/AuthenticationServices/ASExtensionError/userInteractionRequired). In turn, the system calls your [`prepareInterfaceToProvideCredential(for:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/prepareInterfaceToProvideCredential(for:)-18ukb) method to give your extension a chance to present an interface to handle the needed user interaction.

You can alternatively call the cancel method to indicate other error conditions using one of the codes in [`ASExtensionError.Code`](/documentation/AuthenticationServices/ASExtensionError/Code).

> Note:
> When the system calls this method, your extension’s view controller isn’t showing. Don’t attempt to perform any user interaction from this method.

---

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)