---
title: Authorization Services
framework: security
role: collectionGroup
role_heading: API Collection
path: security/authorization-services
---

# Authorization Services

Access restricted areas of the operating system, and control access to particular features of your macOS app.

## Overview

Overview The Security.Authorization API is a programming interface to the Security Server and its policy database. This API facilitates access control to restricted areas of the operating system and allows you to restrict a user’s access to particular features in your macOS app. Use authorization services in: Software that restricts access to its own tools Applications that call system tools Software installers that install privileged tools or require access to restricted areas of the operating system As shown in the image below, the Security Server is a daemon running in the operating system that provides a trusted implementation of various security protocols, including authorization computation. In turn, the Security Server relies on the Security Agent to interface with users when authentication is needed. Thus an app can verify credentials (usernames and passwords) without ever accessing them directly. This authorization process also allows the means of authentication to change in the future (such as adding Touch ID) without your having to modify your app.

note: For a simplified, class-based version of this API, consider using the SFAuthorization class instead. When you need a user interface that enables display and control of the current authorization state for a particular set of rights, use the SFAuthorizationView class. important: The Authorization Services API is not supported within an App Sandbox because the API allows privilege escalation.

## Topics

### Authorization References

- [AuthorizationCreate(_:_:_:_:)](security/authorizationcreate(_:_:_:_:).md)
- [AuthorizationFree(_:_:)](security/authorizationfree(_:_:).md)
- [AuthorizationFlags](security/authorizationflags.md)
- [AuthorizationRef](security/authorizationref.md)

### Authorization Items

- [AuthorizationItem](security/authorizationitem.md)
- [AuthorizationItemSet](security/authorizationitemset.md)
- [AuthorizationRights](security/authorizationrights.md)
- [AuthorizationEnvironment](security/authorizationenvironment.md)
- [Authorization Name Tags](security/authorization-name-tags.md)
- [AuthorizationFreeItemSet(_:)](security/authorizationfreeitemset(_:).md)

### Rights and Credentials

- [AuthorizationCopyInfo(_:_:_:)](security/authorizationcopyinfo(_:_:_:).md)
- [AuthorizationCopyRights(_:_:_:_:_:)](security/authorizationcopyrights(_:_:_:_:_:).md)
- [AuthorizationCopyRightsAsync(_:_:_:_:_:)](security/authorizationcopyrightsasync(_:_:_:_:_:).md)
- [AuthorizationAsyncCallback](security/authorizationasynccallback.md)
- [AuthorizationString](security/authorizationstring.md)
- [Authorization Rights Flags](security/authorization-rights-flags.md)

### Import and Export

- [AuthorizationMakeExternalForm(_:_:)](security/authorizationmakeexternalform(_:_:).md)
- [AuthorizationCreateFromExternalForm(_:_:)](security/authorizationcreatefromexternalform(_:_:).md)
- [AuthorizationExternalForm](security/authorizationexternalform.md)
- [kAuthorizationExternalFormLength](security/kauthorizationexternalformlength.md)

### The Policy Database

- [AuthorizationRightGet(_:_:)](security/authorizationrightget(_:_:).md)
- [AuthorizationRightSet(_:_:_:_:_:_:)](security/authorizationrightset(_:_:_:_:_:_:).md)
- [AuthorizationRightRemove(_:_:)](security/authorizationrightremove(_:_:).md)
- [Policy Database Constants](security/policy-database-constants.md)

### Result Codes

- [Authorization Services Result Codes](security/authorization-services-result-codes.md)

## See Also

### Related Documentation

- [Authentication, Authorization, and Permissions Guide](apple-archive/documentation/Security/Conceptual/AuthenticationAndAuthorizationGuide/Introduction.md)
- [Authorization Services Programming Guide](apple-archive/documentation/Security/Conceptual/authorization_concepts/01introduction/introduction.html.md)
