# IRPCVaultLoginsAdmin.ModifyVaultLoginEx

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/ModifyVaultLoginEx/

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

Replaces the data of a vault login, optionally including its account name.

- **Service:** [Vault login accounts](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/index.md) `MFiles.IRPCVaultLoginsAdmin`
- **gRPC method:** `/MFiles.IRPCVaultLoginsAdmin/ModifyVaultLoginEx`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/modify-vault-login-ex`
- **Request:** [`ModifyVaultLoginExRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ModifyVaultLoginEx/index.md#request)
- **Response:** [`ModifyVaultLoginExResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ModifyVaultLoginEx/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:** no
- **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). The system administrator role is refused.
- If `login` gives a different account name (domain or user name), `allow_changing_username`
  must be true; otherwise the call fails with "Access denied". The new name must not exist yet.
  The user account that refers to the login is updated to the new name. Logins with an
  `external_id` cannot be renamed.
- An unknown `account_name` fails with "Not found".

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

## Request: ModifyVaultLoginExRequest

> 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 current account name of the login. |
| `allow_changing_username` | `bool` | True to allow renaming the login; the user account that refers to it is updated too. |
| `login` | [`Login`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Login/index.md) | The new data of the login. See [Login](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Login/index.md). |
| `login.account_type` | [`AccountType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.AccountType/index.md) | Account type (e.g. M-Files or Windows). Values: `ACCOUNT_TYPE_UNINITIALIZED` (0), `ACCOUNT_TYPE_MFILES` (1), `ACCOUNT_TYPE_WINDOWS` (2). |
| `login.domain_name` | `string` | Domain name, if acctype is eAccountTypeWindows. Otherwise unset. |
| `login.user_name` | `string` | User name. Cannot be unset. |
| `login.options` | [`SRVROLES`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SRVROLES/index.md) | Bitmask of the server roles of the login. |
| `login.options.all` | `bool` | Specifies all flags set; Including any future flags. |
| `login.options.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. |
| `login.options.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. |
| `login.options.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. |
| `login.full_name` | `string` | The full name of the user. May be unset. |
| `login.email_address` | `string` | The email address of the user. May be unset. |
| `login.license_type` | [`LicenseType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.LicenseType/index.md) | License type. 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). |
| `login.credential_type` | [`CredentialType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.CredentialType/index.md) | Credential type. Values: `CREDENTIAL_TYPE_USER` (0), `CREDENTIAL_TYPE_TECHNICAL` (1). |
| `login.client_id` | `string` | Client ID, if credentialtype is eCredentialTypeTechnical. Otherwise unset. |
| `login.external_id` | `string` | The user identity in external system, such as Microsoft Entra (where the identity is a GUID). |
| `update_client_id` | `bool` | Ignored by current servers. |

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

## Response: ModifyVaultLoginExResponse

No fields.

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

## Related methods

- [ModifyVaultLogin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ModifyVaultLogin/index.md): Changes the server roles, password, full name, email address or license type of a vault login.
