---
title: listCredentials()
framework: secureelementcredential
role: symbol
role_heading: Instance Method
path: secureelementcredential/credentialsession/listcredentials()
---

# listCredentials()

Retrieves a list of of credentials to which the app has access rights.

## Declaration

```swift
func listCredentials() async throws -> [CredentialSession.Credential]
```

## Mentioned in

Accessing and using secure element credentials

## Return Value

Return Value An array of credentials to which the calling app has access rights. The order of credentials in this array is random.

## Discussion

Discussion When you call this method, the framework caches a snapshot of these credentials. Because credentials can change, refresh your data models whenever your app performs any kind of write operation using the SecureElementCredential framework. Also update whenever your app returns to the foreground. note: When you call this method from an app extension that has the Digital Credentials API - Mobile Document Provider entitlement, the returned array contains only credentials configured as Government ID credentials on the Apple Business Register (ABR) portal.

## See Also

### Accessing credentials

- [CredentialSession.Credential](secureelementcredential/credentialsession/credential.md)
