---
title: "validateDeviceCredential(_:)"
framework: mattersupport
role: symbol
role_heading: Instance Method
path: "mattersupport/matteradddeviceextensionrequesthandler/validatedevicecredential(_:)"
---

# validateDeviceCredential(_:)

Performs verification and attestation checks.

## Declaration

```swift
func validateDeviceCredential(_ deviceCredential: MatterAddDeviceExtensionRequestHandler.DeviceCredential) async throws
```

## Overview

Overview Override this method to perform additional verification and attestation checks, which execute after Apple’s built-in device attestation checks. If either attestation fails as indicated by an exception thrown here, a warning dialog appears before proceeding. This is the first callback that the system invokes during the setup flow. It runs after selecting a device but before commissioning, and can abort commissioning if the credential is rejected by throwing an exception.

## See Also

### Configuring and validating the device

- [configureDevice(named:in:)](mattersupport/matteradddeviceextensionrequesthandler/configuredevice(named:in:).md)
- [MatterAddDeviceExtensionRequestHandler.DeviceCredential](mattersupport/matteradddeviceextensionrequesthandler/devicecredential.md)
- [rooms(in:)](mattersupport/matteradddeviceextensionrequesthandler/rooms(in:).md)
