# IRPCVaultLoginsAdmin.GetWindowsGroupsInVault

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

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

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

Lists Windows groups of the server's domains, for importing users by group.

- **Service:** [Vault login accounts](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/index.md) `MFiles.IRPCVaultLoginsAdmin`
- **gRPC method:** `/MFiles.IRPCVaultLoginsAdmin/GetWindowsGroupsInVault`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-windows-groups-in-vault`
- **Request:** [`GetWindowsGroupsInVaultRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetWindowsGroupsInVault/index.md#request)
- **Response:** [`GetWindowsGroupsInVaultResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetWindowsGroupsInVault/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 vault right `manage_users`. Without a domain, local groups of the server computer
  are included (not on a domain controller).
- The number of groups searched is limited; `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: GetWindowsGroupsInVaultRequest

> 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 list groups from, or unset for all groups. |
| `organizational_unit_name_dn` | `string` | The distinguished name of an organizational unit to search in, or unset to search the whole domain. |
| `search_sub_items` | `bool` | True to search the organizational units below it too. Used only with `domain_name`. |

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

## Response: GetWindowsGroupsInVaultResponse

> 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` | Group names, for example `DOMAIN\Domain Users`. |
| `group_limit_exceeded` | `bool` | True if more groups exist than were returned. |
