# SessionData

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

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

A new session, returned by [LogIn](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogIn/index.md) and the other login methods.

- **Full name:** `MFiles.SessionData`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-session_id"></a>`session_id` | `bytes` | 1 | The session ID (48 bytes). Send it unchanged in the `mfiles-session-id-bin` metadata header of every call that needs a session. |
| <a id="f-account_name"></a>`account_name` | `string` | 2 | The login account name, with the case stored on the server. |
| <a id="f-access_rights"></a>`access_rights` | [`SessionAccess`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SessionAccess/index.md) | 3 | What the session may do on server level and in the vault, regardless of object permissions. |
| <a id="f-server_vault_capabilities"></a>`server_vault_capabilities` | [`ServerVaultCapabilities`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ServerVaultCapabilities/index.md) | 4 | Capabilities of the server and, for vault sessions, the vault, as they apply to this user. More precise than [GetServerCapabilities](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/GetServerCapabilities/index.md). |
| <a id="f-locale"></a>`locale` | `uint32` | 5 | The Windows locale ID used for sorting, for example 1033. |
| <a id="f-keep_alive_interval_in_seconds"></a>`keep_alive_interval_in_seconds` | `uint32` | 6 | Call [KeepAlive](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/KeepAlive/index.md) at least this often. It is half of the session's idle timeout. |
| <a id="f-use_strict_set_equality_comparison"></a>`use_strict_set_equality_comparison` | `bool` | 7 | If false, not equal type comparisons are performed in pre-MF11 style in which it is enough that at least one of the left-side values does not match any of the right-side values in order to treat the left and right values unequal. If true, none of the left-side values can match any of the right-side values in order to treat the left and right values unequal i.e. pure set-based exclusion. Prefer using the new comparison style. The old behavior is provided for compatibility reasons. |
| <a id="f-product_mode"></a>`product_mode` | [`ProductMode`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ProductMode/index.md) | 8 | The edition of the server license. Values: `PRODUCT_MODE_FULL` (0), `PRODUCT_MODE_EXPRESS` (1), `PRODUCT_MODE_BUSINESS` (2). |
| <a id="f-vault_data"></a>`vault_data` | [`VaultData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.VaultData/index.md) | 9 | The user's identity in the vault. Unset for a server-level session. |
| <a id="f-account_type"></a>`account_type` | [`AccountType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.AccountType/index.md) | 10 | Whether the login account is an M-Files or a Windows account. Values: `ACCOUNT_TYPE_UNINITIALIZED` (0), `ACCOUNT_TYPE_MFILES` (1), `ACCOUNT_TYPE_WINDOWS` (2). |
| <a id="f-server_data"></a>`server_data` | [`ServerData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ServerData/index.md) | 11 | The server's license serial number and deployment type. |
| <a id="f-license_type"></a>`license_type` | [`LicenseType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.LicenseType/index.md) | 12 | The license the session uses. Values: `LICENSE_TYPE_NONE` (0), `LICENSE_TYPE_NAMED_USER_LICENSE` (1), `LICENSE_TYPE_CONCURRENT_USER_LICENSE` (2), `LICENSE_TYPE_READ_ONLY_LICENSE` (3), `LICENSE_TYPE_VISITOR_LICENSE` (4). |
| <a id="f-keep_upload_session_alive_interval_in_seconds"></a>`keep_upload_session_alive_interval_in_seconds` | `uint32` | 13 | Keep a file upload session alive at least this often (half of the upload session timeout). |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCLogin.LogIn](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogIn/index.md): Authenticates the caller and opens a session to a vault, or to the server when the vault GUID is all zeros.
- [IRPCLogin.LogInRemote](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogInRemote/index.md): Logs in (with authentication) to a remote server.
- [IRPCLogin.LogInWithSession](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogInWithSession/index.md): Opens a new session to a vault (or the server) for the user of an existing session, without authenticating again.
- [IRPCLogin.Relogin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/Relogin/index.md): Logs in again by using the current session ID. Used by M-Files' own clients.

<a id="used-in-fields"></a>

## Used in fields

- [`LogInWithSessionResponse.session_data`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogInWithSession/index.md#response): The new session. Use its `session_id` for calls to the target vault.
- [`LogInRemoteResponse.session_data`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogInRemote/index.md#response): Description of the created session when login is complete, or unset otherwise.
- [`ReloginResponse.session_data`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/Relogin/index.md#response): The session. Use its `session_id` from now on.
- [`LogInResponse.session_data`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogIn/index.md#response): The new session, set when the login is complete and unset while a multi-step login is still in progress.
