# IRPCVault.GetReportAccessCredentials

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Vault information](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/index.md)

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

Badges: `Vault API / core` `read` `session` `idempotent` `returns metadata structure version`

Gets the report access credentials for this vault. The credentials are encrypted with the provided public key.

- **Service:** [Vault information](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/index.md) `MFiles.IRPCVault`
- **gRPC method:** `/MFiles.IRPCVault/GetReportAccessCredentials`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-report-access-credentials`
- **Request:** [`GetReportAccessCredentialsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetReportAccessCredentials/index.md#request)
- **Response:** [`GetReportAccessCredentialsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetReportAccessCredentials/index.md#response)
- **Book and level:** Vault API, core
- **Kind:** read
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

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

## Remarks

Used by M-Files reporting components. Requires a server license that includes reporting;
otherwise fails with `E_MFILES_NO_LICENSE_FOR_REPORTING`. The credentials are encrypted with the
caller's public key.

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

## Request: GetReportAccessCredentialsRequest

> 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 |
|---|---|---|
| `public_key` | `bytes` | The public key as a BLOB for encrypting the credentials. |

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

## Response: GetReportAccessCredentialsResponse

> 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 |
|---|---|---|
| `pimpersonation` | [`Impersonation`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Impersonation/index.md) | Receives the report access credentials (represented by Impersonation sturct). |
| `pimpersonation.type` | [`ImpersonationType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ImpersonationType/index.md) | Impersonation type. Values: `IMPERSONATION_TYPE_SYSTEM_ACCOUNT` (0), `IMPERSONATION_TYPE_LOCAL_WINDOWS_ACCOUNT` (1), `IMPERSONATION_TYPE_EXTERNAL_ACCOUNT` (2). |
| `pimpersonation.account` | `string` | Account name (e.g. DOMAIN\user). |
| `pimpersonation.encrypted_password` | `bytes` | Encrypted password. |
