# AuthDataServer

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

The server's part of an authentication exchange, returned by
[LogIn](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogIn/index.md).

- **Full name:** `MFiles.AuthDataServer`
- **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-type"></a>`type` | [`AuthDataType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.AuthDataType/index.md) | 1 | The authentication method, as in the request. Values: `AUTH_DATA_TYPE_UNDEFINED` (0), `AUTH_DATA_TYPE_MFILES_LEG1` (1), `AUTH_DATA_TYPE_MFILES_LEG2` (2), `AUTH_DATA_TYPE_WINDOWS` (3), `AUTH_DATA_TYPE_PLUGIN` (4), `AUTH_DATA_TYPE_CREDENTIALS` (5), `AUTH_DATA_TYPE_ANONYMOUS` (6). |
| <a id="f-data"></a>`data` | [`AuthDataServerUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AuthDataServerUnion/index.md) | 2 | Method-specific reply: a challenge, a token to pass on, or nothing. |
| <a id="f-authentication_attempt_identifier"></a>`authentication_attempt_identifier` | [`AuthenticationAttemptIdentifier`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AuthenticationAttemptIdentifier/index.md) | 3 | Identifies this login attempt. In multi-step methods, send it back in the next call, in the `authentication_attempt_identifier` field of the request's union member. Ignore it for `AUTH_DATA_TYPE_CREDENTIALS`. |

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

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

## Used in fields

- [`LogInRemoteResponse.authentication_data`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogInRemote/index.md#response): The remote server's part of the authentication exchange, as in `LogIn`.
- [`LogInResponse.authentication_data`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogIn/index.md#response): The server's half of the authentication exchange. For multi-step methods it carries the next challenge, whether the login is done, and the attempt identifier to send back. For `AUTH_DATA_TYPE_CREDENTIALS` there is nothing to act on.
