# IRPCVaultLoginsAdmin.ResetVaultLoginPassword

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

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

Sets a new password for a vault login, authorized by a password reset link.

- **Service:** [Vault login accounts](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/index.md) `MFiles.IRPCVaultLoginsAdmin`
- **gRPC method:** `/MFiles.IRPCVaultLoginsAdmin/ResetVaultLoginPassword`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/reset-vault-login-password`
- **Request:** [`ResetVaultLoginPasswordRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ResetVaultLoginPassword/index.md#request)
- **Response:** [`ResetVaultLoginPasswordResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/ResetVaultLoginPassword/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 a vault session but no vault rights: `expiration_time` and `reset_password_hash`
  from the link created by
  [CreateVaultLoginPasswordResetRequest](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/CreateVaultLoginPasswordResetRequest/index.md)
  authorize the change. An expired or invalid link fails.
- The new password must be sent as an encrypted hash: with a `new_password_hash`, an
  unencrypted `password_encryption` or an undefined `password_hash_algorithm_new` fails with
  "The parameter is incorrect.".

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

## Request: ResetVaultLoginPasswordRequest

> 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 from the reset link. |
| `expiration_time` | `string` | The expiration time from the reset link. |
| `reset_password_hash` | `string` | The hash from the reset link. |
| `new_password_hash` | `string` | The encrypted hash of the new password. |
| `password_encryption` | [`PasswordEncryption`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.PasswordEncryption/index.md) | How `new_password_hash` is encrypted. Must not be `PASSWORD_ENCRYPTION_UNENCRYPTED`. Values: `PASSWORD_ENCRYPTION_RC4` (0), `PASSWORD_ENCRYPTION_UNENCRYPTED` (1), `PASSWORD_ENCRYPTION_AES256` (2). |
| `password_hash_algorithm_new` | [`PasswordHashAlgorithm`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.PasswordHashAlgorithm/index.md) | The algorithm the new password was hashed with. Values: `PASSWORD_HASH_ALGORITHM_MD5` (0), `PASSWORD_HASH_ALGORITHM_UNDEFINED` (1), `PASSWORD_HASH_ALGORITHM_PBKDF2_WITH_SHA512_AND100000_ITERS` (2). |
| `new_password_salt` | `string` | The salt used in hashing the new password. |

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

## Response: ResetVaultLoginPasswordResponse

No fields.

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

## Related methods

- [CreateVaultLoginPasswordResetRequest](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/CreateVaultLoginPasswordResetRequest/index.md): Creates a password reset link for an M-Files login of the vault, and optionally emails it to the login's email address.
