> ## 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.

# Grant

> One entitlement a principal holds.

```csharp
public sealed record Grant : IEquatable<Grant>
```

**Implements:** `IEquatable<Grant>`

## Constructors

```csharp
public Grant(PrincipalRef Holder, EntitlementRef Entitlement)
```

One entitlement a principal holds.

### Parameters

**Holder** `PrincipalRef` *required*

The principal holding it.

**Entitlement** `EntitlementRef` *required*

The entitlement held.

## Properties

**Entitlement** `EntitlementRef` *required*

The entitlement held.

**ExpiresAt** `Instant?`

When it expires.

**GrantedAt** `Instant?`

When it was granted.

**Holder** `PrincipalRef` *required*

The principal holding it.

**Immutable** `bool` *required*

Whether the vendor refuses changes to it.

**Inherited** `bool` *required*

Whether it is held through something else.

**LastUsedAt** `Instant?`

When it was last used.

**ManagedBy** `string`

What controls it when the vendor refuses changes, such as a dynamic group's rule.

**Properties** `JsonObject`

The field item's other properties, such as a condition.

**Through** `EntitlementRef`

The entitlement it is held through, such as membership of a group, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when the vendor does not say.

## Methods

### Deconstruct()

```csharp
public void Deconstruct(out PrincipalRef Holder, out EntitlementRef Entitlement)
```

#### Parameters

**Holder** `PrincipalRef` *required*

**Entitlement** `EntitlementRef` *required*

### Equals()

```csharp
public bool Equals(Grant? other)
```

#### Parameters

**other** `Grant` *required*

#### Returns

`bool`

```csharp
public override bool Equals(object? obj)
```

#### Parameters

**obj** `object` *required*

#### Returns

`bool`

### GetHashCode()

```csharp
public override int GetHashCode()
```

#### Returns

`int`

### operator !=()

```csharp
public static bool operator !=(Grant? left, Grant? right)
```

#### Parameters

**left** `Grant` *required*

**right** `Grant` *required*

#### Returns

`bool`

### operator ==()

```csharp
public static bool operator ==(Grant? left, Grant? right)
```

#### Parameters

**left** `Grant` *required*

**right** `Grant` *required*

#### Returns

`bool`

### ToString()

```csharp
public override string ToString()
```

#### Returns

`string`


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