# UserAccountAdditionMode

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) > [Enums](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/index.md)

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

User account addition mode enumeration.

- **Full name:** `MFiles.UserAccountAdditionMode`
- **Proto file:** [`mfiles/enums.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/enums.proto)

<a id="values"></a>

## Values

| Name | Number | Description |
|---|---|---|
| <a id="v-USER_ACCOUNT_ADDITION_MODE_ALWAYS_ADD"></a>`USER_ACCOUNT_ADDITION_MODE_ALWAYS_ADD` | 0 | Always add. Do not try to undelete old accounts. |
| <a id="v-USER_ACCOUNT_ADDITION_MODE_UNDELETE_OR_ADD"></a>`USER_ACCOUNT_ADDITION_MODE_UNDELETE_OR_ADD` | 1 | First attempt to undelete account by GUID or login name. Add new account if old account cannot be undeleted. |
| <a id="v-USER_ACCOUNT_ADDITION_MODE_ONLY_UNDELETE"></a>`USER_ACCOUNT_ADDITION_MODE_ONLY_UNDELETE` | 2 | Only undelete old account. Do not create new account if old account cannot be undeleted. |

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

## Used by methods

- [IRPCUsersAdmin.AddUser](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUsersAdmin/AddUser/index.md): Adds a user account to the vault, or brings back a removed one.

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

## Used in fields

- [`AddUserRequest.addition_mode`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUsersAdmin/AddUser/index.md#request): Whether a removed account with the same login name is brought back. See [UserAccountAdditionMode](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.UserAccountAdditionMode/index.md).
