# LoginData

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.LoginData/

Which vault to log in to, and options for the new session.

- **Full name:** `MFiles.LoginData`
- **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-server_hostname"></a>`server_hostname` | `string` | 1 | The host name the client used to reach the server. Optional for user name and password logins. Anonymous logins, and server-level logins on servers with vault login accounts, use it to find the vault configured for that host name. |
| <a id="f-vault_guid"></a>`vault_guid` | `string` | 2 | The vault to log in to, as a GUID string with or without braces, in any case. Use `{00000000-0000-0000-0000-000000000000}` for a server-level session; an empty string is rejected with `E_MFILES_INVALID_VAULT_GUID_X_DESC`. |
| <a id="f-is_administrative"></a>`is_administrative` | `bool` | 3 | True for administrative tools that manage the vault rather than work with documents, as M-Files Admin does. Applications leave it false. |
| <a id="f-client_session_timeout_in_seconds"></a>`client_session_timeout_in_seconds` | `uint32` | 4 | Optional. Requests a longer idle timeout for a vault session. Honored only when it is at least the server's session timeout and at most 7 days (or the server timeout if that is longer); otherwise, and for server-level sessions, the server timeout applies. The effective value shows as `SessionData.keep_alive_interval_in_seconds`, which is half of it. |

<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

- [`LogInWithSessionRequest.login_data`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogInWithSession/index.md#request): The target vault (`vault_guid`) and session options.
- [`LogInRemoteRequest.login_data`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogInRemote/index.md#request): Description of the desired login.
- [`ReloginRequest.login_data`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/Relogin/index.md#request): Must name the vault of the session in `vault_guid`.
- [`LogInRequest.login_data`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogIn/index.md#request): The target vault and session options. `vault_guid` is required; see Remarks.
