# IRPCObjectTypesAdmin.ChangeObjectTypeItemAutomaticPermissionsForObjects

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) > [Object type administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/index.md)

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

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

Sets or clears the automatic permissions that an item (a value list item or an object) gives to
the objects that refer to it.

- **Service:** [Object type administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/index.md) `MFiles.IRPCObjectTypesAdmin`
- **gRPC method:** `/MFiles.IRPCObjectTypesAdmin/ChangeObjectTypeItemAutomaticPermissionsForObjects`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/change-object-type-item-automatic-permissions-for-objects`
- **Request:** [`ChangeObjectTypeItemAutomaticPermissionsForObjectsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/ChangeObjectTypeItemAutomaticPermissionsForObjects/index.md#request)
- **Response:** [`ChangeObjectTypeItemAutomaticPermissionsForObjectsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/ChangeObjectTypeItemAutomaticPermissionsForObjects/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 `change_metadata_structure` and `license_allows_modifications`, and read access to
  the item.
- Applying the change to existing objects runs as background tasks, returned in
  `async_task_ids`; follow them with
  [GetAsyncTask](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCBackgroundOperationsAdmin/GetAsyncTask/index.md).
- For classes (list 1) the change increments the metadata structure version.

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

## Request: ChangeObjectTypeItemAutomaticPermissionsForObjectsRequest

> 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_id` | [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The value list item or object: `type` is the value list or object type ID, `item_id.internal_id` the item or object ID. |
| `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_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_id.item_id.internal_id` | `int32` | The ID of the object or value list item. |
| `obj_id.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. |
| `utf8szaacl` | [`AutomaticPermissions`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AutomaticPermissions/index.md) | The new automatic permissions. Ignored when `acl_valid` is false. |
| `utf8szaacl.permissions` | [`NamedACL`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.NamedACL/index.md) | The automatic permissions for an object for which the user selects this item. |
| `utf8szaacl.permissions.id` | `int32` | Named ACL ID. |
| `utf8szaacl.permissions.name` | `string` | The name of the named ACL. |
| `utf8szaacl.permissions.type` | [`NACLType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.NACLType/index.md) | The type of the NACL. Values: `NACLTYPE_NONE` (0), `NACLTYPE_NORMAL` (1), `NACLTYPE_INTERNAL` (2). |
| `utf8szaacl.permissions.acl_for_objects` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | The predefined permissions. This defines the ACL which this named ACL encapsulates. |
| `utf8szaacl.permissions.guid` | `string` | GUID for the NACL. |
| `utf8szaacl.is_default` | `bool` | True if these automatic permissions are not private i.e. they are not directly specified for (owned by) this item but they come from somewhere else, e.g. from the default/common automatic permissions of the object type. |
| `utf8szaacl.use_object_permissions` | `bool` | If true the object/item's own permissions are used as its automatic permissions. |
| `acl_valid` | `bool` | False to remove the item's automatic permissions. |
| `automatic_permissions_forced_active` | `bool` | True to make the new automatic permissions active on the referring objects, false to add them inactive. No effect when `acl_valid` is false. |

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

## Response: ChangeObjectTypeItemAutomaticPermissionsForObjectsResponse

> 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 |
|---|---|---|
| `async_task_ids[]` | repeated [`AsyncTaskID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AsyncTaskID/index.md) | Asynchronous task identifiers, if any, related to the change. |
| `async_task_ids[].id` | `int64` | Task ID. |
| `async_task_ids[].type` | `string` | Task type name. |
| `async_task_ids[].definition` | `string` | The display string of the task definition. |

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

## Related methods

- [IRPCBackgroundOperationsAdmin.GetAsyncTask](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCBackgroundOperationsAdmin/GetAsyncTask/index.md): Gets one asynchronous task by ID.
