# IRPCVaultLoginsAdmin.ModifyVaultLogin

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Vault login accounts](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/index.md)

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

Badges: `Administration API / specialized` `admin` `session` `idempotent`

Changes the server roles, password, full name, email address or license type of a vault login.

- **Service:** [Vault login accounts](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/index.md) `MFiles.IRPCVaultLoginsAdmin`
- **gRPC method:** `/MFiles.IRPCVaultLoginsAdmin/ModifyVaultLogin`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/modify-vault-login`
- **Request:** [`ModifyVaultLoginRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ModifyVaultLogin/index.md#request)
- **Response:** [`ModifyVaultLoginResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ModifyVaultLogin/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

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

## Remarks

- Requires the vault right `manage_users` (see the service overview for servers where vault
  logins are read-only for vault administrators).
- `srvroles` is always applied; the system administrator role is refused. The password changes
  only with `change_password`, and the name, email and license type only with
  `update_other_fields`. With `update_other_fields`, a login with an `external_id` fails with
  "Access denied" (it is maintained by identity synchronization).
- An unknown account name fails with "Not found".
- `update_client_id` and `client_id` are ignored by this method.
- To rename the login, use
  [ModifyVaultLoginEx](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ModifyVaultLoginEx/index.md).

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

## Request: ModifyVaultLoginRequest

> 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 |
|---|---|---|
| `account_name` | `string` | The account name of the login to modify. |
| `srvroles` | [`SRVROLES`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SRVROLES/index.md) | The new server roles of the login. `system_administrator` is not allowed. |
| `srvroles.all` | `bool` | Specifies all flags set; Including any future flags. |
| `srvroles.system_administrator` | `bool` | System administrator (can perform any operation on the server). [ name( "vaultCreator" ) ] const SRVROLES SRVROLE_VAULT_CREATOR		= ( 1 << 1 );  //!< Can create, modify and delete vaults. Can also restore vaults. [ name( "backupOperator" ) ] const SRVROLES SRVROLE_BACKUP_OPERATOR		= ( 1 << 2 );  //!< Can back up vaults. |
| `srvroles.can_log_in` | `bool` | Can log in. A login that does not have this role is disabled and cannot log in even if the login has the sysadmin role. |
| `srvroles.invalid_password` | `bool` | This special role indicates that the M-Files login does not yet have a valid password. MFAdmin uses this flag to force the user to define the password. |
| `change_password` | `bool` | True to set the password from `password_info`. |
| `password_hash` | `string` | Legacy field. Leave empty and use `password_info`. |
| `password_info` | [`PasswordInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PasswordInfo/index.md) | The new encrypted password hash. Used only with `change_password`. |
| `password_info.hash` | `string` | Password hash. |
| `password_info.hash_algorithm` | [`PasswordHashAlgorithm`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.PasswordHashAlgorithm/index.md) | Password hash algorithm. Values: `PASSWORD_HASH_ALGORITHM_MD5` (0), `PASSWORD_HASH_ALGORITHM_UNDEFINED` (1), `PASSWORD_HASH_ALGORITHM_PBKDF2_WITH_SHA512_AND100000_ITERS` (2). |
| `password_info.salt` | `string` | Password salt. |
| `password_info.encryption` | [`PasswordEncryption`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.PasswordEncryption/index.md) | Encryption algorithm used to protect the password hash. Values: `PASSWORD_ENCRYPTION_RC4` (0), `PASSWORD_ENCRYPTION_UNENCRYPTED` (1), `PASSWORD_ENCRYPTION_AES256` (2). |
| `update_other_fields` | `bool` | True to set `full_name`, `email_address` and `licensetype`. |
| `full_name` | `string` | The full name of the account. |
| `email_address` | `string` | The email address of the account. |
| `licensetype` | [`LicenseType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.LicenseType/index.md) | The new license type. Used only with `update_other_fields`. 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). |
| `update_client_id` | `bool` | Ignored. |
| `client_id` | `string` | Ignored. |

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

## Response: ModifyVaultLoginResponse

No fields.

<a id="related"></a>

## Related methods

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