---
title: "SecKeychainCopyAccess(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/seckeychaincopyaccess(_:_:)"
---

# SecKeychainCopyAccess(_:_:)

Retrieves the application access of a keychain.

## Declaration

```swift
func SecKeychainCopyAccess(_ keychain: SecKeychain?, _ access: UnsafeMutablePointer<SecAccess?>) -> OSStatus
```

## Parameters

- `keychain`: A reference to the keychain from which to copy the access object. Pass NULL to specify the default keychain.
- `access`: A pointer to an access object. On return, this points to the access object of the specified keychain.

## Return Value

Return Value A result code. See Security Framework Result Codes.
