# ExternalGroupImportMode

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Enums](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/index.md)

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

External group import mode enumeration.

- **Full name:** `MFiles.ExternalGroupImportMode`
- **Proto file:** [`mfiles/enums.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/enums.proto)

<a id="values"></a>

## Values

| Name | Number | Description |
|---|---|---|
| <a id="v-EXTERNAL_GROUP_IMPORT_MODE_UNDEFINED"></a>`EXTERNAL_GROUP_IMPORT_MODE_UNDEFINED` | 0 | Undefined for internal groups. |
| <a id="v-EXTERNAL_GROUP_IMPORT_MODE_DIRECT_USERS"></a>`EXTERNAL_GROUP_IMPORT_MODE_DIRECT_USERS` | 1 | Only direct users of the group are included |
| <a id="v-EXTERNAL_GROUP_IMPORT_MODE_DIRECT_AND_NESTED_USERS"></a>`EXTERNAL_GROUP_IMPORT_MODE_DIRECT_AND_NESTED_USERS` | 2 | Users of the group and its sub groups are included |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCLoginsAdmin.GetWindowsGroupMembers](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetWindowsGroupMembers/index.md): Lists the users and groups that are members of a Windows group.
- [IRPCVaultLoginsAdmin.GetWindowsGroupMembersInVault](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetWindowsGroupMembersInVault/index.md): Lists the users and groups that are members of a Windows group.

<a id="used-in-fields"></a>

## Used in fields

- [`UserGroup.import_mode`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.UserGroup/index.md#f-import_mode): Import mode for external groups.
- [`GetWindowsGroupMembersRequest.egim`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/GetWindowsGroupMembers/index.md#request): `EXTERNAL_GROUP_IMPORT_MODE_DIRECT_USERS` for the direct members only, or `EXTERNAL_GROUP_IMPORT_MODE_DIRECT_AND_NESTED_USERS` to include the members of nested groups.
- [`GetWindowsGroupMembersInVaultRequest.egim`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultLoginsAdmin/GetWindowsGroupMembersInVault/index.md#request): Whether to include only direct members or also members of nested groups. See [ExternalGroupImportMode](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ExternalGroupImportMode/index.md).
