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

# \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent">\</a> Class LicenseAgent

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

License query, download, activation

```csharp theme={null}
public class LicenseAgent : AgentBase, ILicenseAgent, IAgentBase, IDisposable
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[AgentBase](SuperOffice.WebApi.Agents.AgentBase.md) ←
[LicenseAgent](SuperOffice.WebApi.Agents.LicenseAgent.md)

#### Implements

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

#### Inherited Members

[AgentBase.\_json](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__json),
[AgentBase.\_binary](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__binary),
[AgentBase.\_config](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__config),
[AgentBase.\_client](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__client),
[AgentBase.\_disposeClient](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__disposeClient),
[AgentBase.Merge(RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Merge_SuperOffice_WebApi_RequestOptions_),
[AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromObject_System_Net_Http_HttpMethod_System_String_System_Object_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromStream_System_Net_Http_HttpMethod_System_String_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromObjectWithStream_System_Net_Http_HttpMethod_System_String_System_Object_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.ParseAuthorization(IAuthorization)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ParseAuthorization_SuperOffice_WebApi_Authorization_IAuthorization_),
[AgentBase.CancelRequest()](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_CancelRequest),
[AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequestObject_System_Net_Http_HttpMethod_System_String_System_Object_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequestObjectWithStream_System_Net_Http_HttpMethod_System_String_System_Object_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.SendRequest(HttpRequestMessage, RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequest_System_Net_Http_HttpRequestMessage_SuperOffice_WebApi_RequestOptions_),
[AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ThrowOnResponseErrorAsync_System_Net_Http_HttpRequestMessage_System_Net_Http_HttpResponseMessage_),
[AgentBase.ParseResponse\<T\&gt;(HttpResponseMessage)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ParseResponse__1_System_Net_Http_HttpResponseMessage_),
[AgentBase.Finally(RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Finally_SuperOffice_WebApi_RequestOptions_),
[AgentBase.Dispose()](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Dispose),
[AgentBase.Configuration](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Configuration),
[AgentBase.Client](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Client),
[AgentBase.HasRunningRequest](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_HasRunningRequest),
[AgentBase.ClientCancellationTokenSource](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ClientCancellationTokenSource),
[AgentBase.ProgressListener](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ProgressListener),
[AgentBase.UploadProgressListener](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_UploadProgressListener),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Examples

\<pre>\<code class="lang-csharp">using SuperOffice.WebApi;
using SuperOffice.WebApi.Agents;

var mySession = new WebApiOptions("[http://example.com/super/api](http://example.com/super/api)");
mySession.Authorization = new AuthorizationUsernamePassword("user", "pass");
using (LicenseAgent agent = new LicenseAgent(mySession))
\{
// call methods on agent here...
}\</code>\</pre>

## Constructors

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_\_ctor\_System\_Net\_Http\_HttpClient\_">\</a> LicenseAgent(HttpClient)

Constructor: License query, download, activation

```csharp theme={null}
public LicenseAgent(HttpClient httpClient)
```

#### Parameters

`httpClient` [HttpClient](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient)

Use this HTTP client instead of making own HttpClient instance.

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_\_ctor\_SuperOffice\_WebApi\_WebApiOptions\_System\_Net\_Http\_HttpClient\_">\</a> LicenseAgent(WebApiOptions, HttpClient)

Constructor: License query, download, activation

```csharp theme={null}
public LicenseAgent(WebApiOptions options, HttpClient httpClient = null)
```

#### Parameters

`options` [WebApiOptions](SuperOffice.WebApi.WebApiOptions.md)

Base URL and authentication values.

`httpClient` [HttpClient](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient)

Optional: Use this HTTP client instead of making a new one.

## Methods

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_ActivateLicenseInfoAsync\_SuperOffice\_WebApi\_Data\_ExtendedLicenseInfo\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ActivateLicenseInfoAsync(ExtendedLicenseInfo, RequestOptions)

Save a new license to the database.

```csharp theme={null}
public Task<LicenseResult> ActivateLicenseInfoAsync(ExtendedLicenseInfo newLicense, RequestOptions requestOptions = null)
```

#### Parameters

`newLicense` [ExtendedLicenseInfo](SuperOffice.WebApi.Data.ExtendedLicenseInfo.md)

New license to save to the database.

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

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_AddLicenseFromFileAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> AddLicenseFromFileAsync(string, RequestOptions)

Load and activate a new license from file/string if the new license is valid.

```csharp theme={null}
public Task<ExtendedLicenseInfo> AddLicenseFromFileAsync(string fileContent, RequestOptions requestOptions = null)
```

#### Parameters

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

Content of the license file as XML.

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

Activated license

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

Assign third party licenses

```csharp theme={null}
public Task<ModuleLicenseLink[]> AssignThirdPartyLicensesAsync(int associateId, string moduleOwner, string[] moduleLicenseNames, RequestOptions requestOptions = null)
```

#### Parameters

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

User to assign third party licenses for

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

Name of the module owner to assign license for

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

Name of module licenses to assign

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

All module license names assigned

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_ChangeSerialNumberAsync\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ChangeSerialNumberAsync(string, string, RequestOptions)

Change the new serial number for the installation. Requests a new license from SuperLicense, checks if change is authorized.

```csharp theme={null}
public Task<LicenseResult> ChangeSerialNumberAsync(string newCompanyName, string newSerialNumber, RequestOptions requestOptions = null)
```

#### Parameters

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

The new company name

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

New serial number to change to.

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

License after serial number/name change

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetCentralLicenseAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetCentralLicenseAsync(RequestOptions)

```csharp theme={null}
public Task<LicenseOwner[]> GetCentralLicenseAsync(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)\<[LicenseOwner](SuperOffice.WebApi.Data.LicenseOwner.md)\[]\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetFencingInfoAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetFencingInfoAsync(RequestOptions)

Returns fencinginfo if license fence is near or reached

```csharp theme={null}
public Task<FencingInfo> GetFencingInfoAsync(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)\<[FencingInfo](SuperOffice.WebApi.Data.FencingInfo.md)\&gt;

The info of which license fence that is reached or near

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetLicenseForAllOwnersFromDBAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetLicenseForAllOwnersFromDBAsync(RequestOptions)

Get all licenses, with usage, from all module owners as they are stored in the database

```csharp theme={null}
public Task<ExtendedLicenseInfo[]> GetLicenseForAllOwnersFromDBAsync(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)\<[ExtendedLicenseInfo](SuperOffice.WebApi.Data.ExtendedLicenseInfo.md)\[]\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetLicenseFromDBAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetLicenseFromDBAsync(string, RequestOptions)

Get license, with usage, as it is stored in the database for one particular module owner.

```csharp theme={null}
public Task<ExtendedLicenseInfo> GetLicenseFromDBAsync(string ownerName, RequestOptions requestOptions = null)
```

#### Parameters

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

Name of the module owner.

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

License, with usage, as it is stored in the database.

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetLicenseFromFileAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetLicenseFromFileAsync(string, RequestOptions)

Load a new license from file

```csharp theme={null}
public Task<ExtendedLicenseInfo> GetLicenseFromFileAsync(string fileContent, RequestOptions requestOptions = null)
```

#### Parameters

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

Content of the license file as read.

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

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetLicenseFromLicenseServerAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetLicenseFromLicenseServerAsync(string, RequestOptions)

```csharp theme={null}
public Task<ExtendedLicenseInfo> GetLicenseFromLicenseServerAsync(string ownerName, RequestOptions requestOptions = null)
```

#### Parameters

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

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

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetLicenseStatusFromLicenseServerAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetLicenseStatusFromLicenseServerAsync(string, RequestOptions)

Get License from the license server for a particular module owner.

```csharp theme={null}
public Task<CheckLicenseStatusResult> GetLicenseStatusFromLicenseServerAsync(string ownerName, RequestOptions requestOptions = null)
```

#### Parameters

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

Name of the module owner to get license 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)\<[CheckLicenseStatusResult](SuperOffice.WebApi.Data.CheckLicenseStatusResult.md)\&gt;

License from the database, from the license server and with usage.

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetModuleLicenseFromDBAsync\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetModuleLicenseFromDBAsync(string, string, RequestOptions)

Get license information for one particular license module.

```csharp theme={null}
public Task<ModuleLicense> GetModuleLicenseFromDBAsync(string ownerName, string moduleName, RequestOptions requestOptions = null)
```

#### Parameters

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

Name of the module owner.

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

Name of the license module.

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

Module License details, as it is stored in the database. NULL if not found.

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetModuleLicenseHistoryFromLicenseServerAsync\_SuperOffice\_WebApi\_Data\_ExtendedLicenseInfo\_SuperOffice\_WebApi\_Data\_ExtendedModuleLicense\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetModuleLicenseHistoryFromLicenseServerAsync(ExtendedLicenseInfo, ExtendedModuleLicense, RequestOptions)

Get details about a license from the license server.

```csharp theme={null}
public Task<string> GetModuleLicenseHistoryFromLicenseServerAsync(ExtendedLicenseInfo licenseInfo, ExtendedModuleLicense moduleLicense, RequestOptions requestOptions = null)
```

#### Parameters

`licenseInfo` [ExtendedLicenseInfo](SuperOffice.WebApi.Data.ExtendedLicenseInfo.md)

Description of the license

`moduleLicense` [ExtendedModuleLicense](SuperOffice.WebApi.Data.ExtendedModuleLicense.md)

Information about a particular module to get information for.

`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;

Information about a particular license module.

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetSatelliteLicensesAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetSatelliteLicensesAsync(int, RequestOptions)

Obtain information about satellite module licenses

```csharp theme={null}
public Task<LicenseOwner[]> GetSatelliteLicensesAsync(int satelliteId, RequestOptions requestOptions = null)
```

#### Parameters

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

Satellite id to check for satellite module licenses

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

Satellite module licenses grouped by owners.

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetShopUrlAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetShopUrlAsync(string, RequestOptions)

Get the shop URL for the specified module owner. This can be used to redirect user to the web shop.

```csharp theme={null}
public Task<string> GetShopUrlAsync(string ownerName, RequestOptions requestOptions = null)
```

#### Parameters

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

Name of the module owner.

`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;

The URL which contains the shop for the specified module owner.

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

Get license assignments for an associate for licenses belonging to an other module owner than SuperOffice

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

#### Parameters

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

User to get third party license assignments for

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

Name of the module owner to get license assignments for

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

Module license names

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetUserAndInstallationLicenceStatusAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetUserAndInstallationLicenceStatusAsync(int, RequestOptions)

Get status values for user licenses and installation license that can be used for feedback to the user.

```csharp theme={null}
public Task<UserAndInstallationLicenceStatus> GetUserAndInstallationLicenceStatusAsync(int associateId, RequestOptions requestOptions = null)
```

#### Parameters

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

Associate id to use when loading information about user licenses and installation license status.

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

An object that holds information for producing license status feedback to the user.

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetUserLicensesAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetUserLicensesAsync(int, RequestOptions)

Obtain information about associate module licenses

```csharp theme={null}
public Task<LicenseOwner[]> GetUserLicensesAsync(int associateId, RequestOptions requestOptions = null)
```

#### Parameters

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

Associate id to check for associate module licenses

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

Associate module licenses grouped by owners.

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_GetUserLicensesMDOListAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetUserLicensesMDOListAsync(RequestOptions)

Get all licenses in a MDOListItem structure.

```csharp theme={null}
public Task<SelectableMDOListItem[]> GetUserLicensesMDOListAsync(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)\<[SelectableMDOListItem](SuperOffice.WebApi.Data.SelectableMDOListItem.md)\[]\&gt;

Hierarchical structure of user licenses.

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_RemoveLicenseFromDBAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> RemoveLicenseFromDBAsync(string, RequestOptions)

Remove the license from a particular module owner from the database.  It is not permitted to remove licenses from SuperOffice

```csharp theme={null}
public Task<LicenseResult> RemoveLicenseFromDBAsync(string moduleOwner, RequestOptions requestOptions = null)
```

#### Parameters

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

Name of the module owner to remove license 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)\<[LicenseResult](SuperOffice.WebApi.Data.LicenseResult.md)\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_SaveCentralLicenseAsync\_SuperOffice\_WebApi\_Data\_LicenseOwner\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveCentralLicenseAsync(LicenseOwner\[], RequestOptions)

```csharp theme={null}
public Task<LicenseOwner[]> SaveCentralLicenseAsync(LicenseOwner[] license, RequestOptions requestOptions = null)
```

#### Parameters

`license` [LicenseOwner](SuperOffice.WebApi.Data.LicenseOwner.md)\[]

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

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

Unassign (remove) third party licenses

```csharp theme={null}
public Task<ModuleLicenseLink[]> UnassignThirdPartyLicensesAsync(int associateId, string moduleOwner, string[] moduleLicenseNames, RequestOptions requestOptions = null)
```

#### Parameters

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

User to unassign third party licenses for

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

Name of the module owner to unassign license for

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

Name of module licenses to unassign (remove)

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

All module license names assigned

### \<a id="SuperOffice\_WebApi\_Agents\_LicenseAgent\_ValidateLicenseInfoAsync\_SuperOffice\_WebApi\_Data\_ExtendedLicenseInfo\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ValidateLicenseInfoAsync(ExtendedLicenseInfo, RequestOptions)

Validate that a license is consistant.

```csharp theme={null}
public Task<LicenseResult> ValidateLicenseInfoAsync(ExtendedLicenseInfo licenseInfo, RequestOptions requestOptions = null)
```

#### Parameters

`licenseInfo` [ExtendedLicenseInfo](SuperOffice.WebApi.Data.ExtendedLicenseInfo.md)

License to validate consistancy for

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


## Related topics

- [SuperOffice.WebApi.Data.License](/en/api/reference/webapi/SuperOffice.WebApi.Data.License.md)
- [SuperOffice.WebApi.Data.LicenseInfo](/en/api/reference/webapi/SuperOffice.WebApi.Data.LicenseInfo.md)
- [SuperOffice.WebApi.Data.LicenseOwner](/en/api/reference/webapi/SuperOffice.WebApi.Data.LicenseOwner.md)
- [SuperOffice.WebApi.Data.LicenseResult](/en/api/reference/webapi/SuperOffice.WebApi.Data.LicenseResult.md)
- [SuperOffice.WebApi.Data.ModuleLicense](/en/api/reference/webapi/SuperOffice.WebApi.Data.ModuleLicense.md)
- [SuperOffice.WebApi.Data.ExtendedModuleLicense](/en/api/reference/webapi/SuperOffice.WebApi.Data.ExtendedModuleLicense.md)
