# IRPCDocClassGroupsAdmin.GetDocClassGroups

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) > [Class groups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/index.md)

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

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

Gets all class groups with their member classes.

- **Service:** [Class groups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/index.md) `MFiles.IRPCDocClassGroupsAdmin`
- **gRPC method:** `/MFiles.IRPCDocClassGroupsAdmin/GetDocClassGroups`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-doc-class-groups`
- **Request:** [`GetDocClassGroupsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/GetDocClassGroups/index.md#request)
- **Response:** [`GetDocClassGroupsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/GetDocClassGroups/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 `read_all_metadata_structure`; a normal user gets "Access denied.".
  Without that right, use
  [GetObjectClassesAndGroups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefs/GetObjectClassesAndGroups/index.md).
- Returned 7 groups in the Sample Vault. The order is undefined.

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

## Request: GetDocClassGroupsRequest

No fields.

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

## Response: GetDocClassGroupsResponse

> 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 |
|---|---|---|
| `class_groups[]` | repeated [`ClassGroup`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ClassGroup/index.md) | One [ClassGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ClassGroup/index.md) per class group. |
| `class_groups[].id` | `int32` | The ID of the class group (an item ID in value list 2, Class groups). |
| `class_groups[].name` | `string` | The name of the group. |
| `class_groups[].member_classes[]` | repeated `int32` | The IDs of the classes in the group. |
| `class_groups[].object_type` | `int32` | The object type with which this class group is used. |

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

## Related methods

- [IRPCPropertyDefs.GetObjectClassesAndGroups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefs/GetObjectClassesAndGroups/index.md): Gets all classes and class groups that the user is allowed to see.
