<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/AuthorizationItem",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@SA@AuthorizationItem"
  },
  "title" : "AuthorizationItem"
}
-->

# AuthorizationItem

A structure containing information about an authorization right or the authorization environment.

```
struct AuthorizationItem
```

## Overview

When using an authorization item to contain a right, set the [`name`](/documentation/Security/AuthorizationItem/name) field to the name of the right—for example, `"com.myOrganization.myProduct.myRight"`, the [`valueLength`](/documentation/Security/AuthorizationItem/valueLength) and [`flags`](/documentation/Security/AuthorizationItem/flags) fields to `0`, and the value field to `nil`. For more information on naming rights, read [Authorization Services Programming Guide](https://developer.apple.com/library/archive/documentation/Security/Conceptual/authorization_concepts/01introduction/introduction.html#//apple_ref/doc/uid/TP30000995)

When using an authorization item for the [`AuthorizationExecuteWithPrivileges`](/documentation/Security/AuthorizationExecuteWithPrivileges) function, set the [`name`](/documentation/Security/AuthorizationItem/name) field to [`kAuthorizationRightExecute`](/documentation/Security/kAuthorizationRightExecute), and the [`flags`](/documentation/Security/AuthorizationItem/flags) field to `0`. Set the [`value`](/documentation/Security/AuthorizationItem/value) field to the full POSIX pathname of the tool to execute and the [`valueLength`](/documentation/Security/AuthorizationItem/valueLength) field to the byte length of the value in the [`value`](/documentation/Security/AuthorizationItem/value) field.

When using an authorization item to contain environment data, set the [`name`](/documentation/Security/AuthorizationItem/name) field to the name of the environment data—for example, [`kAuthorizationEnvironmentUsername`](/documentation/Security/kAuthorizationEnvironmentUsername)—and the [`flags`](/documentation/Security/AuthorizationItem/flags) field to `0`. Set the [`value`](/documentation/Security/AuthorizationItem/value) field, in this case, to the actual user name and the [`valueLength`](/documentation/Security/AuthorizationItem/valueLength) field to the byte length of the value in the [`value`](/documentation/Security/AuthorizationItem/value) field.

---

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)