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

# removeRight(forIdentifier:completion:)

Removes a right from the right store given its unique identifier.

## Declaration

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

```swift
func removeRight(forIdentifier identifier: String) async throws
```

## Parameters

- `identifier`: The identifier for the right to remove.
- `handler`: A completion handler to call when the removal operation 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 removeRight(forIdentifier identifier: String) async throws For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously. Removing a right also removes any resources stored along with the right, such as secrets.

## See Also

### Removing stored rights

- [removeRight(_:completion:)](localauthentication/larightstore/removeright(_:completion:).md)
- [removeAllRights(completion:)](localauthentication/larightstore/removeallrights(completion:).md)
