# IRPCObjectOperations.SetPropertiesWithMetadataAttributedTo

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

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

Sets property values with metadata and records the change as made by a built-in agent user.

- **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/SetPropertiesWithMetadataAttributedTo`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/set-properties-with-metadata-attributed-to`
- **Request:** [`SetPropertiesWithMetadataAttributedToRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/SetPropertiesWithMetadataAttributedTo/index.md#request)
- **Response:** [`SetPropertiesWithMetadataAttributedToResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/SetPropertiesWithMetadataAttributedTo/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="remarks"></a>

## Remarks

Used by M-Files automatic metadata features. `attributed_to_user_id` names the built-in agent user;
0 records no attribution.

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

## Request: SetPropertiesWithMetadataAttributedToRequest

> 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 |
|---|---|---|
| `object_version` | [`ObjVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVer/index.md) | The object version for which the properties belong to. |
| `object_version.obj_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The object. |
| `object_version.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). |
| `object_version.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`. |
| `object_version.version` | [`ObjVerVersion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVerVersion/index.md) | The version. Usually `OBJ_VER_VERSION_TYPE_SPECIFIC` with `internal_version`. |
| `object_version.version.type` | [`ObjVerVersionType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ObjVerVersionType/index.md) | What `internal_version` means. `OBJ_VER_VERSION_TYPE_SPECIFIC` for a version number. Values: `OBJ_VER_VERSION_TYPE_UNINITIALIZED` (0), `OBJ_VER_VERSION_TYPE_LATEST` (1), `OBJ_VER_VERSION_TYPE_ANY` (2), `OBJ_VER_VERSION_TYPE_ALL` (3), `OBJ_VER_VERSION_TYPE_SPECIFIC` (4), `OBJ_VER_VERSION_TYPE_VALUE_LIST_ITEM` (6), `OBJ_VER_VERSION_TYPE_OBJECT_LEVEL_REFERENCE` (7). |
| `object_version.version.internal_version` | `int32` | The version number, starting from 1, when `type` is `OBJ_VER_VERSION_TYPE_SPECIFIC`. The server returns -1 with `OBJ_VER_VERSION_TYPE_LATEST`. |
| `object_version.version.external_repository_version` | `string` | Used only for objects in external repositories. Leave empty. |
| `object_version.version.external_repository_sort_key` | `int64` | Used only for objects in external repositories. Leave 0. |
| `allow_modifying_checked_in_object` | `bool` | Whether to allow modifying a checked-in object (automatic checkout and checkin). |
| `allow_missing_required_properties` | `bool` | Whether to allow missing required properties on the set. |
| `property_values[]` | repeated [`PropertyValueWithMetadata`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValueWithMetadata/index.md) | The property values with metadata to set. |
| `property_values[].property_def` | `int32` | Property definition ID. |
| `property_values[].value` | [`TypedValueWithMetadata`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValueWithMetadata/index.md) | The value of the property. |
| `property_values[].value.type` | [`Datatype`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.Datatype/index.md) | Data type. Note. Name of the property can't be isNull because name collision with Objective-C reserved name. |
| `property_values[].value.is_null_value` | `bool` | Is the value unset. |
| `property_values[].value.data` | [`TypedValueUnionWithMetadata`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValueUnionWithMetadata/index.md) | The value data as a union, if set. |
| `property_values[].value.value_metadata` | [`TypedValueMetadata`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValueMetadata/index.md) | The metadata about the typed value. If the value is a Lookup or MSLookup, this data will be in that struct. |
| `attributed_to_user_id` | `int32` | Built-in agent user ID to attribute the change to, or 0 for no attribution. |

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

## Response: SetPropertiesWithMetadataAttributedToResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page. Fields marked (recursive) refer to a type already on their path.

| Field | Type | Description |
|---|---|---|
| `object_version` | [`ObjectVersionExWPWithMetadata`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionExWPWithMetadata/index.md) | The object version and properties (with metadata) after the operation. |
| `object_version.object_version` | [`ObjectVersionEx`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersionEx/index.md) | Object info. |
| `object_version.object_version.version_info` | [`ObjectVersion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectVersion/index.md) | Object Version information. |
| `object_version.object_version.object_info` | [`ObjectLevelInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectLevelInfo/index.md) | Object-level information. |
| `object_version.properties[]` | repeated [`PropertyValueWithMetadata`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyValueWithMetadata/index.md) | Property values, or an empty array. |
| `object_version.properties[].property_def` | `int32` | Property definition ID. |
| `object_version.properties[].value` | [`TypedValueWithMetadata`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValueWithMetadata/index.md) | The value of the property. |
| `object_version.acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | If set, ACL. |
| `object_version.acl.checked_out_to_user` | `int32` | Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist. |
| `object_version.acl.is_fully_authoritative` | `bool` | Specifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version. |
| `object_version.acl.custom_component` | [`AccessControlListComponent`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponent/index.md) | Accesses the custom component of this ACL. |
| `object_version.acl.restrictive_components[]` | repeated [`AccessControlListComponentMapEntry`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponentMapEntry/index.md) | Accesses the restrictive automatic components of this ACL. |
| `object_version.acl.secondary_access_control_list` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) (recursive) | Secondary ACL used for latest version ACL. Not used for access check if null. |
| `object_version.acl.additive_components[]` | repeated [`AccessControlListComponentMapEntry`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlListComponentMapEntry/index.md) | Accesses the additive automatic components of this ACL. |
| `object_version.current_user_permissions` | [`ObjectPermissionsForClient`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectPermissionsForClient/index.md) | If set, permissions of the object version. |
| `object_version.current_user_permissions.can_user_see` | `bool` | The object is visible for the current user (provided for symmetry). |
| `object_version.current_user_permissions.can_user_edit` | `bool` | The current user can edit the object. |
| `object_version.current_user_permissions.can_user_delete` | `bool` | The current user can delete the object. |
| `object_version.current_user_permissions.can_user_change_permissions` | `bool` | The current user can change the object permissions. |

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

## Related methods

- [SetProperties](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/SetProperties/index.md): Adds, replaces or removes property values of an object.
- [SetPropertiesWithMetadata](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/SetPropertiesWithMetadata/index.md): Adds, replaces or removes property values of an object, also storing metadata about each value.
