# IRPCUserGroupsAdmin.SyncExternalWindowsGroup

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

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

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

Updates the members of an external Windows group from the domain directory.

- **Service:** [User groups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/index.md) `MFiles.IRPCUserGroupsAdmin`
- **gRPC method:** `/MFiles.IRPCUserGroupsAdmin/SyncExternalWindowsGroup`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/sync-external-windows-group`
- **Request:** [`SyncExternalWindowsGroupRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/SyncExternalWindowsGroup/index.md#request)
- **Response:** [`SyncExternalWindowsGroupResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/SyncExternalWindowsGroup/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

- Reads the group's members from the directory and updates the group, adding user accounts for
  new members as needed. Large groups can take a long time.
- Requires the vault right `manage_users`. A group that is not an external Windows group fails;
  an unknown ID fails with "Not found.".
- The result is recorded for
  [GetUserGroupSyncStatus](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/GetUserGroupSyncStatus/index.md).

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

## Request: SyncExternalWindowsGroupRequest

> 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 |
|---|---|---|
| `id` | `int32` | The ID of the external Windows group to synchronize. |

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

## Response: SyncExternalWindowsGroupResponse

No fields.

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

## Related methods

- [GetUserGroupSyncStatus](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCUserGroupsAdmin/GetUserGroupSyncStatus/index.md): Gets the result of the last synchronization of an external Windows group.
