# IRPCAnonymousLoginOperations.SetAnonymousAuthenticationSettings

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Anonymous login](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCAnonymousLoginOperations/index.md)

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

Badges: `Vault API / standard` `write` `session`

Turns anonymous access to the vault on or off.

- **Service:** [Anonymous login](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCAnonymousLoginOperations/index.md) `MFiles.IRPCAnonymousLoginOperations`
- **gRPC method:** `/MFiles.IRPCAnonymousLoginOperations/SetAnonymousAuthenticationSettings`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/set-anonymous-authentication-settings`
- **Request:** [`SetAnonymousAuthenticationSettingsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCAnonymousLoginOperations/SetAnonymousAuthenticationSettings/index.md#request)
- **Response:** [`SetAnonymousAuthenticationSettingsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCAnonymousLoginOperations/SetAnonymousAuthenticationSettings/index.md#response)
- **Book and level:** Vault API, standard
- **Kind:** write
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Requires the vault rights `manage_users` and `license_allows_modifications`.
- On: creates the anonymous user account if the vault has none, or allows the existing one to
  log in. Off: the account stays but can no longer log in. Calling with the current value
  changes nothing.
- If the vault has more than one anonymous user account, the call fails with "Not
  implemented.".
- Anyone who can reach the server can then read whatever the anonymous account is allowed to
  see. Check its permissions before turning anonymous access on.

<a id="request"></a>

## Request: SetAnonymousAuthenticationSettingsRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `anonymous_authentication_settings` | [`AnonymousAuthenticationSettings`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AnonymousAuthenticationSettings/index.md) | Set `anonymous_authentication_enabled` to true to turn anonymous access on, false to turn it off. |
| `anonymous_authentication_settings.anonymous_authentication_enabled` | `bool` | Boolean indicating whether anonymous authentication should be enabled or disabled. |

<a id="response"></a>

## Response: SetAnonymousAuthenticationSettingsResponse

No fields.
