# ServerUser

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

Struct for a server user account.

- **Full name:** `MFiles.ServerUser`
- **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-login_name"></a>`login_name` | `string` | 1 | The login name that is associated with this server user (e.g. 'DOMAIN\user'). |
| <a id="f-server_roles"></a>`server_roles` | [`SRVROLES`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SRVROLES/index.md) | 2 | Bitmask of the server roles of the login. |

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

## Used by methods

- [IRPCServerAdmin.GetServerUsers](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetServerUsers/index.md): Gets the server users: account names with server roles that are stored separately from login accounts.
- [IRPCServerAdmin.UpsertServerUser](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/UpsertServerUser/index.md): Adds a server user or changes the server roles of an existing one.

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

## Used in fields

- [`GetServerUsersResponse.serverusers`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/GetServerUsers/index.md#response): The server users, each an account name and its server roles. See [ServerUser](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ServerUser/index.md).
- [`UpsertServerUserRequest.serveruser`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/UpsertServerUser/index.md#request): The account name and its server roles. See [ServerUser](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ServerUser/index.md).
