# Impersonation

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

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

Struct for an impersonation specification.

- **Full name:** `MFiles.Impersonation`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-type"></a>`type` | [`ImpersonationType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ImpersonationType/index.md) | 1 | Impersonation type. Values: `IMPERSONATION_TYPE_SYSTEM_ACCOUNT` (0), `IMPERSONATION_TYPE_LOCAL_WINDOWS_ACCOUNT` (1), `IMPERSONATION_TYPE_EXTERNAL_ACCOUNT` (2). |
| <a id="f-account"></a>`account` | `string` | 2 | Account name (e.g. DOMAIN\user). |
| <a id="f-encrypted_password"></a>`encrypted_password` | `bytes` | 3 | Encrypted password. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCExportedDataSetsAdmin.GetReportAccessCredentialsAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExportedDataSetsAdmin/GetReportAccessCredentialsAdmin/index.md): Gets the account that is used to access reports generated from the exported data.
- [IRPCExportedDataSetsAdmin.SetReportAccessCredentials](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExportedDataSetsAdmin/SetReportAccessCredentials/index.md): Sets the account that is used to access reports generated from the exported data.
- [IRPCServerAdmin.BackUpMasterDB](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/BackUpMasterDB/index.md): Backs up the server's master database to a file on the server, and returns when the backup is complete.
- [IRPCServerAdmin.RestoreMasterDB](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCServerAdmin/RestoreMasterDB/index.md): Replaces the server's master database with a master database backup file on the server.
- [IRPCVault.GetReportAccessCredentials](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetReportAccessCredentials/index.md): Gets the report access credentials for this vault. The credentials are encrypted with the provided public key.
- [IRPCVaultsAdmin.GetBackupFileContents](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultsAdmin/GetBackupFileContents/index.md): Reads the vault identity and data folders stored in a backup file on the server.

<a id="used-by-messages"></a>

## Used by messages

- [`AdditionalFolder`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AdditionalFolder/index.md): Additional folder.
- [`ArchiveDocsJob`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ArchiveDocsJob/index.md): Struct for a job of archiving whole documents.
- [`ArchiveOldVersionsJob`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ArchiveOldVersionsJob/index.md): Struct for a job of archiving old versions of documents.
- [`BackupJob`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.BackupJob/index.md): Struct for a backup job.
- [`FileSource`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileSource/index.md): File source specific fields.
- [`MailSource`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MailSource/index.md): Mail source specific fields.
- [`RestoreFromArchiveJob`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.RestoreFromArchiveJob/index.md): Struct for a restoring documents from archive job.
- [`RestoreJob`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.RestoreJob/index.md): Struct for a restore job.
- [`SQLDatabase`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SQLDatabase/index.md): Struct for the SQL database of a document vault.
