> ## Documentation Index
> Fetch the complete documentation index at: https://klef.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ISupportsGrants

> Changes and reads what principals hold.

```csharp
public interface ISupportsGrants
```

## Methods

### ChangeGrantsAsync()

```csharp
Task<GrantOutcome> ChangeGrantsAsync(ConnectionContext context, PrincipalRef holder, string entitlementField, IReadOnlyCollection<string> add, IReadOnlyCollection<string> remove, string operationId, CancellationToken cancellationToken)
```

Adds and removes grants on one field of an account or a principal, each value on its own.

#### Parameters

**context** `ConnectionContext` *required*

The connection.

**holder** `PrincipalRef` *required*

The account or principal, of a kind the field is grantable to.

**entitlementField** `string` *required*

The field.

**add** `IReadOnlyCollection\<string\>` *required*

The values to grant.

**remove** `IReadOnlyCollection\<string\>` *required*

The values to take away.

**operationId** `string` *required*

Stable across every retry of one change.

**cancellationToken** `CancellationToken` *required*

Stops the change.

#### Returns

`Task<GrantOutcome>`

### ReadGrantsAsync()

```csharp
Task<IReadOnlyDictionary<string, FieldGrants>> ReadGrantsAsync(ConnectionContext context, string entitlementField, IReadOnlyCollection<string> values, CancellationToken cancellationToken)
```

Reads who holds the given values.

#### Parameters

**context** `ConnectionContext` *required*

**entitlementField** `string` *required*

**values** `IReadOnlyCollection\<string\>` *required*

**cancellationToken** `CancellationToken` *required*

#### Returns

`Task<IReadOnlyDictionary<String,FieldGrants>>`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.