# IRPCVaultLoginsAdmin.GetVaultLoginPasswordHash

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

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

Reads the password hash of a vault login, encrypted with a public key that the caller supplies.

- **Service:** [Vault login accounts](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/index.md) `MFiles.IRPCVaultLoginsAdmin`
- **gRPC method:** `/MFiles.IRPCVaultLoginsAdmin/GetVaultLoginPasswordHash`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-vault-login-password-hash`
- **Request:** [`GetVaultLoginPasswordHashRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetVaultLoginPasswordHash/index.md#request)
- **Response:** [`GetVaultLoginPasswordHashResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetVaultLoginPasswordHash/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`. The hash can be stored on another login with
  [SetVaultLoginPasswordHash](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/SetVaultLoginPasswordHash/index.md)
  without anyone knowing the password.
- Encryption is required: `PASSWORD_ENCRYPTION_UNENCRYPTED` fails with "The parameter is
  incorrect.".

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

## Request: GetVaultLoginPasswordHashRequest

> 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 |
|---|---|---|
| `password_encryption` | [`PasswordEncryption`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.PasswordEncryption/index.md) | How the hash is encrypted for transit. Must not be `PASSWORD_ENCRYPTION_UNENCRYPTED`. Values: `PASSWORD_ENCRYPTION_RC4` (0), `PASSWORD_ENCRYPTION_UNENCRYPTED` (1), `PASSWORD_ENCRYPTION_AES256` (2). |
| `public_key` | `bytes` | The public key the server encrypts the hash with. |
| `account_name` | `string` | The account name of the login. |

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

## Response: GetVaultLoginPasswordHashResponse

> 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 |
|---|---|---|
| `password_hash` | `string` | Legacy copy of the hash. Use `password_info`. |
| `password_info` | [`PasswordInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PasswordInfo/index.md) | The encrypted password hash with its algorithm and salt. |
| `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). |

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

## Related methods

- [SetVaultLoginPasswordHash](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/SetVaultLoginPasswordHash/index.md): Sets the password of a vault login from a password hash.
- [GetVaultLogin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetVaultLogin/index.md): Gets one vault login by account name.
