# Login

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

Struct for a login.

- **Full name:** `MFiles.Login`
- **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-account_type"></a>`account_type` | [`AccountType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.AccountType/index.md) | 1 | Account type (e.g. M-Files or Windows). Values: `ACCOUNT_TYPE_UNINITIALIZED` (0), `ACCOUNT_TYPE_MFILES` (1), `ACCOUNT_TYPE_WINDOWS` (2). |
| <a id="f-domain_name"></a>`domain_name` | `string` | 2 | Domain name, if acctype is eAccountTypeWindows. Otherwise unset. |
| <a id="f-user_name"></a>`user_name` | `string` | 3 | User name. Cannot be unset. |
| <a id="f-options"></a>`options` | [`SRVROLES`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SRVROLES/index.md) | 4 | Bitmask of the server roles of the login. |
| <a id="f-full_name"></a>`full_name` | `string` | 5 | The full name of the user. May be unset. |
| <a id="f-email_address"></a>`email_address` | `string` | 6 | The email address of the user. May be unset. |
| <a id="f-license_type"></a>`license_type` | [`LicenseType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.LicenseType/index.md) | 7 | License type. 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-credential_type"></a>`credential_type` | [`CredentialType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.CredentialType/index.md) | 8 | Credential type. Values: `CREDENTIAL_TYPE_USER` (0), `CREDENTIAL_TYPE_TECHNICAL` (1). |
| <a id="f-client_id"></a>`client_id` | `string` | 9 | Client ID, if credentialtype is eCredentialTypeTechnical. Otherwise unset. |
| <a id="f-external_id"></a>`external_id` | `string` | 10 | The user identity in external system, such as Microsoft Entra (where the identity is a GUID). |

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

## Used by methods

- [IRPCLoginsAdmin.AddLogin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/AddLogin/index.md): Adds a login account to the server.
- [IRPCLoginsAdmin.GetLogin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetLogin/index.md): Gets one login account by account name.
- [IRPCLoginsAdmin.GetLogins](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetLogins/index.md): Gets the login accounts the caller is allowed to see: all of them for system administrators, otherwise those linked to vaults the caller administers.
- [IRPCLoginsAdmin.GetLoginsWithSessions](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetLoginsWithSessions/index.md): Gets the login accounts that currently have open sessions on the server.
- [IRPCVaultLoginsAdmin.AddVaultLogin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/AddVaultLogin/index.md): Adds a login account to the vault.
- [IRPCVaultLoginsAdmin.GetVaultLogin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetVaultLogin/index.md): Gets one vault login by account name.
- [IRPCVaultLoginsAdmin.GetVaultLogins](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetVaultLogins/index.md): Gets all login accounts stored in the vault.
- [IRPCVaultLoginsAdmin.GetVaultLoginsWithSessions](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetVaultLoginsWithSessions/index.md): Gets the login accounts that currently have sessions to this vault.
- [IRPCVaultLoginsAdmin.ModifyVaultLoginEx](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ModifyVaultLoginEx/index.md): Replaces the data of a vault login, optionally including its account name.

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

## Used in fields

- [`AddLoginRequest.login`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/AddLogin/index.md#request): The new login. See [Login](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Login/index.md).
- [`GetLoginsResponse.values`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetLogins/index.md#response): The login accounts. See [Login](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Login/index.md).
- [`GetLoginResponse.plogin`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetLogin/index.md#response): The login account. See [Login](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Login/index.md).
- [`GetLoginsWithSessionsResponse.values`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetLoginsWithSessions/index.md#response): The logins with sessions. See [Login](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Login/index.md).
- [`AddVaultLoginRequest.login`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/AddVaultLogin/index.md#request): The new login. See [Login](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Login/index.md).
- [`GetVaultLoginsResponse.values`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetVaultLogins/index.md#response): The vault logins. See [Login](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Login/index.md).
- [`GetVaultLoginResponse.plogin`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetVaultLogin/index.md#response): The login. See [Login](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Login/index.md).
- [`GetVaultLoginsWithSessionsResponse.values`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetVaultLoginsWithSessions/index.md#response): The logins with active sessions. See [Login](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Login/index.md).
- [`ModifyVaultLoginExRequest.login`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ModifyVaultLoginEx/index.md#request): The new data of the login. See [Login](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Login/index.md).
