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

# SuperOffice.WebApi.Agents.IAssociateAgent

# \<a id="SuperOffice\_WebApi\_Agents\_IAssociateAgent">\</a> Interface IAssociateAgent

Namespace: [SuperOffice.WebApi.Agents](SuperOffice.WebApi.Agents.md)\
Assembly: SuperOffice.WebApi.dll

Associate utilities, notes, not user admininstration

```csharp theme={null}
public interface IAssociateAgent : IAgentBase, IDisposable
```

#### Implements

[IAgentBase](SuperOffice.WebApi.Agents.IAgentBase.md),
[IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

## Methods

### \<a id="SuperOffice\_WebApi\_Agents\_IAssociateAgent\_GetAssociateAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAssociateAsync(int, RequestOptions)

Gets a specific Associate object.

```csharp theme={null}
Task<Associate> GetAssociateAsync(int associateId, RequestOptions requestOptions = null)
```

#### Parameters

`associateId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identifier of the Associate object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Associate](SuperOffice.WebApi.Data.Associate.md)\&gt;

Associate

### \<a id="SuperOffice\_WebApi\_Agents\_IAssociateAgent\_GetAssociateByPersonIdAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAssociateByPersonIdAsync(int, RequestOptions)

Returns the associate that belongs to this person if the person is an associate.

```csharp theme={null}
Task<Associate> GetAssociateByPersonIdAsync(int personId, RequestOptions requestOptions = null)
```

#### Parameters

`personId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The person id

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Associate](SuperOffice.WebApi.Data.Associate.md)\&gt;

Associate if person is associate

### \<a id="SuperOffice\_WebApi\_Agents\_IAssociateAgent\_GetAssociateListAsync\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAssociateListAsync(int\[], RequestOptions)

Gets an array of specific Associate objects.

```csharp theme={null}
Task<Associate[]> GetAssociateListAsync(int[] associateIds, RequestOptions requestOptions = null)
```

#### Parameters

`associateIds` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

The identifiers of the Associate object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Associate](SuperOffice.WebApi.Data.Associate.md)\[]\&gt;

Array of Associate objects

### \<a id="SuperOffice\_WebApi\_Agents\_IAssociateAgent\_GetAssociatesByGroupAsync\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAssociatesByGroupAsync(int, int, RequestOptions)

Method that returns a array of associate , based on DiaryGroupType and groupId. The differernt types are, Userdefined, Usergroup and ResourceHeadings

```csharp theme={null}
Task<Associate[]> GetAssociatesByGroupAsync(int groupId, int type, RequestOptions requestOptions = null)
```

#### Parameters

`groupId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Id of the group

`type` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The type of group. See DiaryGroupType

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[Associate](SuperOffice.WebApi.Data.Associate.md)\[]\&gt;

Array of associate

### \<a id="SuperOffice\_WebApi\_Agents\_IAssociateAgent\_GetEncryptionKeyAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetEncryptionKeyAsync(RequestOptions)

Get unique key made from AssociateId and dbTag used for local storage encryption operations.

```csharp theme={null}
Task<string> GetEncryptionKeyAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[string](https://learn.microsoft.com/dotnet/api/system.string)\&gt;

encryptionKey

### \<a id="SuperOffice\_WebApi\_Agents\_IAssociateAgent\_GetNoteAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetNoteAsync(int, RequestOptions)

Returns an array of strings(notepad pages).

```csharp theme={null}
Task<string[]> GetNoteAsync(int associateId, RequestOptions requestOptions = null)
```

#### Parameters

`associateId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The associate id

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[string](https://learn.microsoft.com/dotnet/api/system.string)\[]\&gt;

Returns an array of strings(notepad pages).

### \<a id="SuperOffice\_WebApi\_Agents\_IAssociateAgent\_LogOffWindowsUsersAsync\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> LogOffWindowsUsersAsync(int\[], RequestOptions)

Method that logs off associates that are logged on to the win client

```csharp theme={null}
Task LogOffWindowsUsersAsync(int[] associateIds, RequestOptions requestOptions = null)
```

#### Parameters

`associateIds` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

The ids of the associates that shall be logged off

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

A void return

### \<a id="SuperOffice\_WebApi\_Agents\_IAssociateAgent\_SaveNoteAsync\_System\_Int32\_System\_String\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveNoteAsync(int, string\[], RequestOptions)

Saves an array of strings(notepad pages).

```csharp theme={null}
Task SaveNoteAsync(int associateId, string[] note, RequestOptions requestOptions = null)
```

#### Parameters

`associateId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The associate id

`note` [string](https://learn.microsoft.com/dotnet/api/system.string)\[]

The array of strings(notepad pages).

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)


## Related topics

- [SuperOffice.WebApi.Agents.AssociateAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AssociateAgent.md)
- [SuperOffice.WebApi.Agents.ISentryAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ISentryAgent.md)
- [SuperOffice.WebApi.Agents.SentryAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.SentryAgent.md)
- [SuperOffice.WebApi.Agents.ProjectAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ProjectAgent.md)
- [SuperOffice.WebApi.Agents.IProjectAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IProjectAgent.md)
- [SuperOffice.WebApi.Agents.IAppointmentAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IAppointmentAgent.md)
