---
title: "right(forIdentifier:completion:)"
framework: localauthentication
role: symbol
role_heading: Instance Method
path: "localauthentication/larightstore/right(foridentifier:completion:)"
---

# right(forIdentifier:completion:)

Fetches a previously stored right from the shared right store.

## Declaration

```swift
func right(forIdentifier identifier: String, completion handler: @escaping @Sendable (LAPersistedRight?, (any Error)?) -> Void)
```

```swift
func right(forIdentifier identifier: String) async throws -> LAPersistedRight
```

## Parameters

- `identifier`: The unique identifier of the right.
- `handler`: A completion handler to call when the right access completes.

## Discussion

Discussion important: You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration: func right(forIdentifier identifier: String) async throws -> LAPersistedRight For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.

## See Also

### Accessing rights

- [shared](localauthentication/larightstore/shared.md)
