<!--
{
  "availability" : [
    "macOS: 10.2.0 - 10.10.0"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecKeychainCopyAccess(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@F@SecKeychainCopyAccess"
  },
  "title" : "SecKeychainCopyAccess(_:_:)"
}
-->

# SecKeychainCopyAccess(_:_:)

Retrieves the application access of a keychain.

```
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

A result code. See [Security Framework Result Codes](/documentation/Security/security-framework-result-codes).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)