<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.1.0 - 10.7.0"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/AuthorizationCopyPrivilegedReference",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@F@AuthorizationCopyPrivilegedReference"
  },
  "title" : "AuthorizationCopyPrivilegedReference"
}
-->

# AuthorizationCopyPrivilegedReference

Retrieves the authorization reference passed by the AuthorizationExecuteWithPrivileges function.

```
OSStatus AuthorizationCopyPrivilegedReference(AuthorizationRef*authorization, AuthorizationFlags flags);
```

## Parameters

`authorization`

A pointer to an authorization reference. The Security Server allocates the authorization reference for you, so you do not need to call the function [`AuthorizationCreate(_:_:_:_:)`](/documentation/Security/AuthorizationCreate(_:_:_:_:)). On return, it points to a copy of the authorization reference used in the call to the [`AuthorizationExecuteWithPrivileges`](/documentation/Security/AuthorizationExecuteWithPrivileges) function.

`flags`

Reserved options. Pass the [`kAuthorizationFlagDefaults`](/documentation/Security/AuthorizationFlags/kAuthorizationFlagDefaults) constant.

## Return Value

A result code. See [Authorization Services Result Codes](/documentation/Security/authorization-services-result-codes).

## Discussion

> Important:
> This function is deprecated.
> Use a `launchd`-launched helper tool and/or the Service Management framework for this functionality.

This function retrieves the authorization reference you pass in the function [`AuthorizationExecuteWithPrivileges`](/documentation/Security/AuthorizationExecuteWithPrivileges). The new process can use the authorization reference to verify authorizations obtained by the calling process.

---

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)