# UserGroup

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

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

Struct for a user group in a vault.

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

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-user_group"></a>`user_group` | [`UserGroupBasic`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.UserGroupBasic/index.md) | 1 | The basic data of the group. |
| <a id="f-is_external_windows_group"></a>`is_external_windows_group` | `bool` | 2 | Is group imported from Windows domain. |
| <a id="f-synchronize_memberships"></a>`synchronize_memberships` | `bool` | 3 | Should memberships of this group be synchronized automatically. |
| <a id="f-license_type_for_new_logins"></a>`license_type_for_new_logins` | [`LicenseType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.LicenseType/index.md) | 4 | Type of the license for logins created automatically. Values: `LICENSE_TYPE_NONE` (0), `LICENSE_TYPE_NAMED_USER_LICENSE` (1), `LICENSE_TYPE_CONCURRENT_USER_LICENSE` (2), `LICENSE_TYPE_READ_ONLY_LICENSE` (3), `LICENSE_TYPE_VISITOR_LICENSE` (4). |
| <a id="f-external_group_name"></a>`external_group_name` | `string` | 5 | The name for external group. Empty if the group is not external. |
| <a id="f-organizational_unit"></a>`organizational_unit` | `string` | 6 | The organizational unit for filtering the AD group searches. Empty if the group is not external. |
| <a id="f-acl"></a>`acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | 7 | Permissions. |
| <a id="f-aliases"></a>`aliases` | `string` | 8 | Semicolon-separated list of semantic aliases. |
| <a id="f-import_mode"></a>`import_mode` | [`ExternalGroupImportMode`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ExternalGroupImportMode/index.md) | 9 | Import mode for external groups. Values: `EXTERNAL_GROUP_IMPORT_MODE_UNDEFINED` (0), `EXTERNAL_GROUP_IMPORT_MODE_DIRECT_USERS` (1), `EXTERNAL_GROUP_IMPORT_MODE_DIRECT_AND_NESTED_USERS` (2). |
| <a id="f-external_repository_name"></a>`external_repository_name` | `string` | 10 | External repository name. unset if this group doesn't represent external repository user information. |
| <a id="f-external_repository_subject_id"></a>`external_repository_subject_id` | `string` | 11 | ID in the external repository. unset if this group doesn't represent external repository user information. |

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

## Used by methods

- [IRPCUserGroupsAdmin.AddOrUndeleteUserGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/AddOrUndeleteUserGroup/index.md): Adds a user group, or brings back a removed group with the same name.
- [IRPCUserGroupsAdmin.AddUserGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/AddUserGroup/index.md): Adds a user group to the vault.
- [IRPCUserGroupsAdmin.GetChangedUserGroups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/GetChangedUserGroups/index.md): Gets the user groups that were added, changed or removed after a version token.
- [IRPCUserGroupsAdmin.GetUserContainersAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/GetUserContainersAdmin/index.md): Gets all user groups of the vault, including the groups that represent external repository users and groups.
- [IRPCUserGroupsAdmin.GetUserGroupAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/GetUserGroupAdmin/index.md): Gets one user group of any type, with its members.
- [IRPCUserGroupsAdmin.GetUserGroupsAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/GetUserGroupsAdmin/index.md): Gets all normal user groups of the vault, with their members.
- [IRPCUserGroupsAdmin.ModifyUserGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/ModifyUserGroup/index.md): Replaces the data and members of an existing user group.

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

## Used in fields

- [`AddUserGroupRequest.usergroup`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/AddUserGroup/index.md#request): The new group. `user_group.id` is ignored; the server assigns the ID.
- [`GetUserGroupsAdminResponse.values`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/GetUserGroupsAdmin/index.md#response): The user groups. See [UserGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.UserGroup/index.md).
- [`ModifyUserGroupRequest.usergroup`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/ModifyUserGroup/index.md#request): The complete new data of the group; `user_group.id` identifies the group.
- [`AddOrUndeleteUserGroupRequest.usergroup`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/AddOrUndeleteUserGroup/index.md#request): The group. `user_group.id` is ignored.
- [`GetUserGroupAdminResponse.usergroup`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/GetUserGroupAdmin/index.md#response): The user group. See [UserGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.UserGroup/index.md).
- [`GetUserContainersAdminResponse.values`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/GetUserContainersAdmin/index.md#response): The user groups of all types.
- [`GetChangedUserGroupsResponse.new_and_modified`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/GetChangedUserGroups/index.md#response): Groups added or changed after `version_token`.
