---
title: Viewing paired accounts on iOS
description: List the MFA accounts associated with a paired iOS device using getDeviceInfo() in the pingonemfa module.
component: orchsdks
page_id: orchsdks:davinci:use-cases/pingone-mfa/ios/04-view-paired-accounts
canonical_url: https://developer.pingidentity.com/orchsdks/davinci/use-cases/pingone-mfa/ios/04-view-paired-accounts.html
llms_txt: https://developer.pingidentity.com/orchsdks/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
keywords: ["DaVinci", "MFA", "PingOne", "iOS", "Accounts", "Device info", "SDK"]
---

# Viewing paired accounts on iOS

[icon: circle-check, set=far]PingOne [icon: apple, set=fab]iOS

After pairing, you can list the PingOne MFA accounts associated with the paired device. This works the same whether the device was paired in a DaVinci flow or with a QR code or pairing key.

![pingone mfa list device info](../../../_images/pingone-mfa-list-device-info.png)Figure 1. Displaying PingOne MFA accounts for an iOS device.

To list PingOne MFA accounts for a device, call `getDeviceInfo()`. The function is `async throws` and returns a `PingOneMFADeviceInfo` object, which contains the list of accounts paired on the device and a list of diagnostic errors. The error list is `nil` unless the module encountered errors while retrieving the account data:

Listing paired accounts

```swift
do {
    let deviceInfo = try await PingOneMFA.getDeviceInfo()
    for account in deviceInfo.accounts {
        print("\(account.name) \(account.family) | region: \(account.region)")
    }
    // deviceInfo.errors is non-nil only when the SDK returned partial error info alongside
    // valid data. The account list is still safe to use; log the errors for debugging.
    deviceInfo.errors?.forEach { err in
        print("Diagnostic: \(err.message)")
        err.internalErrorsList?.forEach { e in
            print("code=\(e.code) info=\(e.userInfo)")
        }
    }
} catch {
    print("Failed to retrieve accounts: \(error.localizedDescription)")
}
```

Each element of `accounts` is a `PingOneMfaAccount` object. For example, a device paired for a single user in the North America region returns an account like this:

Example account data

```json
{
  "region": "NorthAmerica",
  "id": "9c7d4a1e-83f2-4b6e-a5d0-2f1c9e8b7a64",
  "deviceId": "3f5a2c8d-1e4b-4f9a-b6c7-8d0e2f4a9b13",
  "environmentId": "b2e1f9a4-6c3d-4e8f-9a2b-5d7c1e3f6a80",
  "name": "Jane",
  "family": "Doe"
}
```

The properties are:

| Property        | Description                                                                                                                                                                                              |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `region`        | The PingOne service region the account belongs to, for example `NorthAmerica` or `Europe`.The SDK queries all regions and aggregates the results, so a device can hold accounts in more than one region. |
| `id`            | The PingOne user ID.                                                                                                                                                                                     |
| `deviceId`      | The ID PingOne assigned to this pairing.                                                                                                                                                                 |
| `environmentId` | The PingOne environment ID the account belongs to.                                                                                                                                                       |
| `name`          | The user's given name.                                                                                                                                                                                   |
| `family`        | The user's family name.                                                                                                                                                                                  |
