Skip to content
Skip to Content
Coder Docs

Update organization IdP Sync config

PATCH
/api/v2/settings/idpsync/organization/config

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Request Body

New config values

application/json
  1. body
assign_default?boolean
field?string

Response Body

OK

application/json
  1. response
field?string

Field selects the claim field to be used as the created user's organizations. If the field is the empty string, then no organization updates will ever come from the OIDC provider.

mapping?

Mapping maps from an OIDC claim --> Coder organization uuid

organization_assign_default?boolean

AssignDefault will ensure the default org is always included for every user, regardless of their claims. This preserves legacy behavior.

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X PATCH \	"$CODER_URL/api/v2/settings/idpsync/organization/config" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "assign_default": true,  "field": "string"}'
Example Response200
{  "field": "string",  "mapping": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "organization_assign_default": true}