# IRPCLicenseManagement.GetLicenseCodeAndSerialNumber

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [License management](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLicenseManagement/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLicenseManagement/GetLicenseCodeAndSerialNumber/

Badges: `Administration API / specialized` `admin` `session` `idempotent`

Gets the server's serial number, license code and evaluation state.

- **Service:** [License management](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLicenseManagement/index.md) `MFiles.IRPCLicenseManagement`
- **gRPC method:** `/MFiles.IRPCLicenseManagement/GetLicenseCodeAndSerialNumber`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-license-code-and-serial-number`
- **Request:** [`GetLicenseCodeAndSerialNumberRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLicenseManagement/GetLicenseCodeAndSerialNumber/index.md#request)
- **Response:** [`GetLicenseCodeAndSerialNumberResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLicenseManagement/GetLicenseCodeAndSerialNumber/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Requires the system administrator server role (server right `manage_licenses`). Denied for a
  vault administrator on a server with a server license.
- On servers that license each vault through M-Files Manage, a vault session of a vault
  administrator gets that vault's license instead; the evaluation fields are then not set.

<a id="request"></a>

## Request: GetLicenseCodeAndSerialNumberRequest

Get server license information request.

No fields.

<a id="response"></a>

## Response: GetLicenseCodeAndSerialNumberResponse

Get server license information response.

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `evaluation_mode` | `bool` | Tells if the server is running in evaluation mode. |
| `evaluation_expired` | `bool` | True if the evaluation period has ended. Valid only when `evaluation_mode` is true. |
| `evaluation_days_left` | `uint32` | Days left in the evaluation period. Valid only when `evaluation_mode` is true and `evaluation_expired` is false. |
| `serial_number` | `string` | The serial number. Empty in evaluation mode. |
| `license_code` | `string` | The license code. Empty in evaluation mode. |
| `last_license_retrieval` | `string` | When the license was last fetched from M-Files Manage, if the server gets its license from there. |
