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

# ReferenceScim

> A SCIM 2.0 service in memory (RFC 7644): /Users and /Groups with paging, an eq filter, uniqueness on userName , and PATCH by path, so ScimClient has a service …

A SCIM 2.0 service in memory (RFC 7644): `/Users` and `/Groups` with paging, an `eq` filter, uniqueness on `userName`, and PATCH by path, so `ScimClient` has a service to prove itself on. It is the kit's fixture, and says nothing about any vendor's SCIM.

```csharp
public sealed class ReferenceScim : FakeVendor, IDisposable
```

**Extends:** `FakeVendor`

**Implements:** `IDisposable`

## Constructors

```csharp
public ReferenceScim()
```

## Fields

**Root** `string` *required*

## Properties

**ListsGroupsOnUsers** `bool` *required*

Whether a user carries its read-only `groups`, which some services leave out.

**Writes** `List\<string\>` *required*

Every call that is not a read, as method and path.

## Methods

### AnswerAsync()

```csharp
protected override Task<HttpResponseMessage> AnswerAsync(HttpRequestMessage request, CancellationToken cancellationToken)
```

Answers a request that passed the failures.

#### Parameters

**request** `HttpRequestMessage` *required*

**cancellationToken** `CancellationToken` *required*

#### Returns

`Task<HttpResponseMessage>`

### DeleteAccount()

```csharp
public override void DeleteAccount(string externalId)
```

Deletes an account outside the connector.

#### Parameters

**externalId** `string` *required*

### Field()

```csharp
public override string? Field(string externalId, string key)
```

Reads a field from the fake's own state.

#### Parameters

**externalId** `string` *required*

**key** `string` *required*

#### Returns

`string`

### Grant()

```csharp
public override void Grant(string externalId, string entitlementField, string value)
```

Gives an account a value directly.

#### Parameters

**externalId** `string` *required*

**entitlementField** `string` *required*

**value** `string` *required*

### Held()

```csharp
public override IReadOnlyCollection<string> Held(string externalId, string entitlementField)
```

Lists what an account holds on one field.

#### Parameters

**externalId** `string` *required*

**entitlementField** `string` *required*

#### Returns

`IReadOnlyCollection<string>`

### MatchKey()

```csharp
public override string MatchKey(string name)
```

Gets the match key of a named account.

#### Parameters

**name** `string` *required*

#### Returns

`string`

### Nest()

```csharp
public void Nest(string child, string parent, bool typed = true)
```

Makes `child` a member of `parent`, with the member's `type` unless `typed` is off, as some services send it.

#### Parameters

**child** `string` *required*

**parent** `string` *required*

**typed** `bool`

### NewAccount()

```csharp
public override JsonObject NewAccount(string name)
```

Builds the account a valid create writes.

#### Parameters

**name** `string` *required*

#### Returns

`JsonObject`

### SeedAccount()

```csharp
public override string SeedAccount(string name)
```

Adds an active account and returns its id.

#### Parameters

**name** `string` *required*

#### Returns

`string`

### SeedEntitlement()

```csharp
public override string SeedEntitlement(string entitlementField, string name)
```

Adds a value an account can hold.

#### Parameters

**entitlementField** `string` *required*

**name** `string` *required*

#### Returns

`string`

### Standing()

```csharp
public override TenantStanding? Standing(string externalId)
```

Reads how an account stands.

#### Parameters

**externalId** `string` *required*

#### Returns

`Nullable<TenantStanding>`

### User()

```csharp
public JsonObject? User(string externalId)
```

#### Parameters

**externalId** `string` *required*

#### Returns

`JsonObject`

### UserNamed()

```csharp
public JsonObject? UserNamed(string userName)
```

Ignores case.

#### Parameters

**userName** `string` *required*

#### Returns

`JsonObject`


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