---
title: "handle(intent:completion:)"
framework: intents
role: symbol
role_heading: Instance Method
path: "intents/insearchforaccountsintenthandling/handle(intent:completion:)"
---

# handle(intent:completion:)

Handles searching for the account information.

## Declaration

```swift
func handle(intent: INSearchForAccountsIntent, completion: @escaping @Sendable (INSearchForAccountsIntentResponse) -> Void)
```

```swift
func handle(intent: INSearchForAccountsIntent) async -> INSearchForAccountsIntentResponse
```

## Parameters

- `intent`: The intent object containing details about the user’s request. The information in this object has already been resolved and confirmed by your handler object.
- `completion`: The handler block to execute with your response. You must execute this handler at some point during your implementation of this method. This handler has no return value and takes the following parameter:

## Discussion

Discussion Your implementation of this method must perform the search using the specified parameters and return the results in your response object. If you are unable to perform the search, return a response object whose result code indicates the reason for the failure. The response object you create should indicate the success or failure of the operation. Never create a response object using the INSearchForAccountsIntentResponseCode.unspecified or INSearchForAccountsIntentResponseCode.ready codes.
