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

# \<a id="SuperOffice\_WebApi\_Agents\_ISentryAgent">\</a> Interface ISentryAgent

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

Data and function right queries

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

#### Implements

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

## Methods

### \<a id="SuperOffice\_WebApi\_Agents\_ISentryAgent\_CanCreateAppointmentInAllDiariesAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CanCreateAppointmentInAllDiariesAsync(RequestOptions)

CanCreateAppointmentInAllDiaries will check if the current associate can create appointments in diaries belonging all other associates. CanCreateAppointmentInAssociateDiaries will only check against associates that are diary owners.

```csharp theme={null}
Task<bool> CanCreateAppointmentInAllDiariesAsync(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)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

Returns true if the current associate can create appointments in the diary of all the other associates, otherwise false.

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

CanCreateAppointmentInAssociateDiaries will check if the current associate can create appointments in diaries belonging to the associates listed in associateIds. CanCreateAppointmentInAssociateDiaries will only check against associates that are diary owners. If none of the associates listed in the associateIds parameter is a diary owner, the method will return true.

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

#### Parameters

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

Array of associate ids to check.

`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)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

Returns true if the current associate can create appointments in the diary of all the other associates, otherwise false.

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

CanCreateAppointmentInEachAssociateDiary will check if the current associate can create appointments in diaries belonging to the associates listed in associateIds. CanCreateAppointmentInEachAssociateDiary will only check against associates that are diary owners. If none of the associates listed in the associateIds parameter is a diary owner, the method will return true.

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

#### Parameters

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

Array of associate ids to check.

`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)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\[]\&gt;

Returns true if for each given associate if the current associate can create appointments in that diary, otherwise false.

### \<a id="SuperOffice\_WebApi\_Agents\_ISentryAgent\_GetFunctionRightsAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetFunctionRightsAsync(RequestOptions)

Get a string array of all functions rights for the role of the current associate.

```csharp theme={null}
Task<string[]> GetFunctionRightsAsync(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;

String array with the technical names of assigned function rights

### \<a id="SuperOffice\_WebApi\_Agents\_ISentryAgent\_GetNewTableRightAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetNewTableRightAsync(string, RequestOptions)

Returns a TableRight for a new row based on tableName parameter.

```csharp theme={null}
Task<TableRight> GetNewTableRightAsync(string tableName, RequestOptions requestOptions = null)
```

#### Parameters

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

Name of the table to get the TableRights from

`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)\<[TableRight](SuperOffice.WebApi.Data.TableRight.md)\&gt;

The TableRight

### \<a id="SuperOffice\_WebApi\_Agents\_ISentryAgent\_GetTableRightByContactOwnershipAsync\_System\_String\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetTableRightByContactOwnershipAsync(string, int, RequestOptions)

Return the TableRight from the relationship between the current user and the given user and group.

```csharp theme={null}
Task<TableRight> GetTableRightByContactOwnershipAsync(string tableName, int contactId, RequestOptions requestOptions = null)
```

#### Parameters

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

Name of the table to get the TableRights from.

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

The owner contact.

`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)\<[TableRight](SuperOffice.WebApi.Data.TableRight.md)\&gt;

The TableRight

### \<a id="SuperOffice\_WebApi\_Agents\_ISentryAgent\_GetTableRightByOwnershipAsync\_System\_String\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetTableRightByOwnershipAsync(string, int, int, RequestOptions)

Return the TableRight from the relationship between the current user and the given user and group.

```csharp theme={null}
Task<TableRight> GetTableRightByOwnershipAsync(string tableName, int contactGroupId, int contactAssociateId, RequestOptions requestOptions = null)
```

#### Parameters

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

Name of the table to get the TableRights from.

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

The user-group that the associate id is part of.

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

The associate id of the owner of the record

`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)\<[TableRight](SuperOffice.WebApi.Data.TableRight.md)\&gt;

The TableRight

### \<a id="SuperOffice\_WebApi\_Agents\_ISentryAgent\_HasFunctionRightAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> HasFunctionRightAsync(string, RequestOptions)

Get a boolean value indicating if the current user has the functional right.

```csharp theme={null}
Task<bool> HasFunctionRightAsync(string functionRight, RequestOptions requestOptions = null)
```

#### Parameters

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

Function right to check.

`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)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;


## Related topics

- [SuperOffice.WebApi.Agents.SentryAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.SentryAgent.md)
- [SuperOffice.WebApi.Data.Sentry](/en/api/reference/webapi/SuperOffice.WebApi.Data.Sentry.md)
- [SuperOffice.WebApi.Agents.PersonAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.PersonAgent.md)
- [SuperOffice.WebApi.Agents.IPersonAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IPersonAgent.md)
- [SuperOffice.WebApi.Agents.AppointmentAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AppointmentAgent.md)
- [SuperOffice.WebApi.Agents.IAppointmentAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IAppointmentAgent.md)
