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

# \<a id="SuperOffice\_WebApi\_Agents\_ILicenseAgent">\</a> Interface ILicenseAgent

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

License query, download, activation

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

#### Implements

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

## Methods

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

Save a new license to the database.

```csharp theme={null}
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\_ILicenseAgent\_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}
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\_ILicenseAgent\_AssignThirdPartyLicensesAsync\_System\_Int32\_System\_String\_System\_String\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> AssignThirdPartyLicensesAsync(int, string, string\[], RequestOptions)

Assign third party licenses

```csharp theme={null}
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\_ILicenseAgent\_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}
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\_ILicenseAgent\_GetCentralLicenseAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetCentralLicenseAsync(RequestOptions)

```csharp theme={null}
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\_ILicenseAgent\_GetFencingInfoAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetFencingInfoAsync(RequestOptions)

Returns fencinginfo if license fence is near or reached

```csharp theme={null}
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\_ILicenseAgent\_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}
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\_ILicenseAgent\_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}
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\_ILicenseAgent\_GetLicenseFromFileAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetLicenseFromFileAsync(string, RequestOptions)

Load a new license from file

```csharp theme={null}
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\_ILicenseAgent\_GetLicenseFromLicenseServerAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetLicenseFromLicenseServerAsync(string, RequestOptions)

```csharp theme={null}
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\_ILicenseAgent\_GetLicenseStatusFromLicenseServerAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetLicenseStatusFromLicenseServerAsync(string, RequestOptions)

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

```csharp theme={null}
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\_ILicenseAgent\_GetModuleLicenseFromDBAsync\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetModuleLicenseFromDBAsync(string, string, RequestOptions)

Get license information for one particular license module.

```csharp theme={null}
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\_ILicenseAgent\_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}
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\_ILicenseAgent\_GetSatelliteLicensesAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetSatelliteLicensesAsync(int, RequestOptions)

Obtain information about satellite module licenses

```csharp theme={null}
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\_ILicenseAgent\_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}
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\_ILicenseAgent\_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}
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\_ILicenseAgent\_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}
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\_ILicenseAgent\_GetUserLicensesAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetUserLicensesAsync(int, RequestOptions)

Obtain information about associate module licenses

```csharp theme={null}
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\_ILicenseAgent\_GetUserLicensesMDOListAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetUserLicensesMDOListAsync(RequestOptions)

Get all licenses in a MDOListItem structure.

```csharp theme={null}
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\_ILicenseAgent\_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}
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\_ILicenseAgent\_SaveCentralLicenseAsync\_SuperOffice\_WebApi\_Data\_LicenseOwner\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveCentralLicenseAsync(LicenseOwner\[], RequestOptions)

```csharp theme={null}
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\_ILicenseAgent\_UnassignThirdPartyLicensesAsync\_System\_Int32\_System\_String\_System\_String\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> UnassignThirdPartyLicensesAsync(int, string, string\[], RequestOptions)

Unassign (remove) third party licenses

```csharp theme={null}
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\_ILicenseAgent\_ValidateLicenseInfoAsync\_SuperOffice\_WebApi\_Data\_ExtendedLicenseInfo\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ValidateLicenseInfoAsync(ExtendedLicenseInfo, RequestOptions)

Validate that a license is consistant.

```csharp theme={null}
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.Agents.LicenseAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.LicenseAgent.md)
- [WebAPI changes in SuperOffice 12.0](/release-notes/12/api/changes-webapi-12.0.342.0.md)
- [Save Central License](/en/api/reference/restful/agent/license_agent/save-central-license.md)
- [Get Satellite Licenses](/en/api/reference/restful/agent/license_agent/get-satellite-licenses.md)
- [Get User Licenses](/en/api/reference/restful/agent/license_agent/get-user-licenses.md)
- [Get Central License](/en/api/reference/restful/agent/license_agent/get-central-license.md)
