---
title: AuthorizationItem
framework: security
role: symbol
role_heading: Structure
path: security/authorizationitem
---

# AuthorizationItem

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

## Declaration

```swift
struct AuthorizationItem
```

## Overview

Overview When using an authorization item to contain a right, set the name field to the name of the right—for example, "com.myOrganization.myProduct.myRight", the valueLength and flags fields to 0, and the value field to nil. For more information on naming rights, read Authorization Services Programming Guide When using an authorization item for the AuthorizationExecuteWithPrivileges function, set the name field to kAuthorizationRightExecute, and the flags field to 0. Set the value field to the full POSIX pathname of the tool to execute and the valueLength field to the byte length of the value in the value field. When using an authorization item to contain environment data, set the name field to the name of the environment data—for example, kAuthorizationEnvironmentUsername—and the flags field to 0. Set the value field, in this case, to the actual user name and the valueLength field to the byte length of the value in the value field.

## Topics

### Initializers

- [init(name:valueLength:value:flags:)](security/authorizationitem/init(name:valuelength:value:flags:).md)

### Instance Properties

- [flags](security/authorizationitem/flags.md)
- [name](security/authorizationitem/name.md)
- [value](security/authorizationitem/value.md)
- [valueLength](security/authorizationitem/valuelength.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
