---
title: "Update group IdP Sync settings by organization"
method: PATCH
path: "/api/v2/organizations/{organization}/settings/idpsync/groups"
tags: ["Enterprise"]
---

# Update group IdP Sync settings by organization

`PATCH /api/v2/organizations/{organization}/settings/idpsync/groups`

## Path parameters

- `organization` string, uuid, required

## Request body

- CodersdkGroupSyncSettings
  - `auto_create_missing_groups` boolean — AutoCreateMissing controls whether groups returned by the OIDC provider are automatically created in Coder if they are missing.
  - `field` string — Field is the name of the claim field that specifies what groups a user should be in. If empty, no groups will be synced.
  - `legacy_group_name_mapping` object — LegacyNameMapping is deprecated. It remaps an IDP group name to a Coder group name. Since configuration is now done at runtime, group IDs are used to account for group renames. For legacy configurations, this config option has to remain. Deprecated: Use Mapping instead.
  - `mapping` object — Mapping is a map from OIDC groups to Coder group IDs
  - `regex_filter` RegexpRegexp

## Response `200`

OK

- CodersdkGroupSyncSettings
  - `auto_create_missing_groups` boolean — AutoCreateMissing controls whether groups returned by the OIDC provider are automatically created in Coder if they are missing.
  - `field` string — Field is the name of the claim field that specifies what groups a user should be in. If empty, no groups will be synced.
  - `legacy_group_name_mapping` object — LegacyNameMapping is deprecated. It remaps an IDP group name to a Coder group name. Since configuration is now done at runtime, group IDs are used to account for group renames. For legacy configurations, this config option has to remain. Deprecated: Use Mapping instead.
  - `mapping` object — Mapping is a map from OIDC groups to Coder group IDs
  - `regex_filter` RegexpRegexp

---

[API](https://skmtc.dev/coder/apis/coder-api.md) · [All operations](https://skmtc.dev/coder/apis/coder-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/coder/coder-api/revisions/369ae60ab00e/schema)
