# IRPCObjectOperations.FindFileDuplicates

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) > [Objects, versions, properties and files](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/index.md)

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

Badges: `Vault API / core` `write` `session or assertion` `returns metadata structure version`

Finds files in the vault with the same content as the given file version.

- **Service:** [Objects, versions, properties and files](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/index.md) `MFiles.IRPCObjectOperations`
- **gRPC method:** `/MFiles.IRPCObjectOperations/FindFileDuplicates`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/find-file-duplicates`
- **Request:** [`FindFileDuplicatesRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/FindFileDuplicates/index.md#request)
- **Response:** [`FindFileDuplicatesResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/FindFileDuplicates/index.md#response)
- **Book and level:** Vault API, core
- **Kind:** write
- **Session:** Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
- **Idempotent:** no
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

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

## Request: FindFileDuplicatesRequest

> 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 |
|---|---|---|
| `obj_file_ver` | [`ObjFileVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjFileVer/index.md) | The obj file version. |
| `obj_file_ver.obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The object that owns the file. |
| `obj_file_ver.obj_id.type` | `int32` | The object type ID, for example 0 for documents. In a lookup value, the value list ID (for a lookup to objects, the object type ID). |
| `obj_file_ver.obj_id.item_id` | [`ItemID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ItemID/index.md) | The ID of the object within its type, in `item_id.internal_id`. |
| `obj_file_ver.file_ver` | [`FileVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileVer/index.md) | The specific file version, as in `File.file_ver`. |
| `obj_file_ver.file_ver.file_id` | [`FileID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileID/index.md) | The file. |
| `obj_file_ver.file_ver.type` | [`FileVerType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FileVerType/index.md) | `FILE_VER_TYPE_SPECIFIC` for a file version number. Values: `FILE_VER_TYPE_UNINITIALIZED` (0), `FILE_VER_TYPE_LATEST` (1), `FILE_VER_TYPE_ANY` (2), `FILE_VER_TYPE_SPECIFIC` (3). |
| `obj_file_ver.file_ver.internal_version` | `int32` | The file version number. |
| `obj_file_ver.file_ver.external_repository_version` | `string` | Used only for files in external repositories. Leave empty. |
| `obj_file_ver.file_ver.external_repository_sort_key` | `int64` | Used only for files in external repositories. Leave 0. |
| `include_versions_of_this_file` | `bool` | True if the results should include duplicates which are other versions of the same file. |
| `exclude_files_from_deleted_objects` | `bool` | True if the results should exclude duplicates which belong to deleted objects. |

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

## Response: FindFileDuplicatesResponse

> 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 |
|---|---|---|
| `obj_ids[]` | repeated [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | Results. |
| `obj_ids[].type` | `int32` | The object type ID, for example 0 for documents. In a lookup value, the value list ID (for a lookup to objects, the object type ID). |
| `obj_ids[].item_id` | [`ItemID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ItemID/index.md) | The ID of the object within its type, in `item_id.internal_id`. |
| `obj_ids[].item_id.internal_id` | `int32` | The ID of the object or value list item. |
| `obj_ids[].item_id.external_repository_id` | [`ExternalRepositoryID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExternalRepositoryID/index.md) | Used only for objects in external repositories (external connectors). Leave it unset for objects stored in the vault. |

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

## Related methods

- [FindFileDuplicatesOfObjVer](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/FindFileDuplicatesOfObjVer/index.md): Finds files in the vault with the same content as the files of the given object version.
