# IRPCLoginsAdmin.GetWindowsGroups

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) > [Server login accounts](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/index.md)

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

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

Lists Windows groups that the server can see: local groups and domain groups.

- **Service:** [Server login accounts](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/index.md) `MFiles.IRPCLoginsAdmin`
- **gRPC method:** `/MFiles.IRPCLoginsAdmin/GetWindowsGroups`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-windows-groups`
- **Request:** [`GetWindowsGroupsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetWindowsGroups/index.md#request)
- **Response:** [`GetWindowsGroupsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetWindowsGroups/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 the system administrator server role (server right `manage_logins`).
- The number of groups is limited by server configuration; `group_limit_exceeded` tells
  whether the list was cut. Narrow the search with `domain_name` and
  `organizational_unit_name_dn`.

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

## Request: GetWindowsGroupsRequest

> 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 |
|---|---|---|
| `domain_name` | `string` | The domain to search, or unset for all groups. |
| `organizational_unit_name_dn` | `string` | The distinguished name of an organizational unit to search in (see [GetOrganizationalUnitsForDomain](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetOrganizationalUnitsForDomain/index.md)), or unset to search from the domain level. |
| `search_sub_items` | `bool` | True to search the sub-units too. Used only when `domain_name` is set. |

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

## Response: GetWindowsGroupsResponse

> 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 |
|---|---|---|
| `groups[]` | repeated `string` | Receives the names of the groups (e.g. "DOMAIN\Domain Users"). |
| `group_limit_exceeded` | `bool` | Set to true if the result set does not contain all groups. |
