Skip to content
Skip to Content
Coder Docs

Update organization IdP Sync settings

PATCH
/api/v2/settings/idpsync/organization

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Request Body

New settings

application/json
  1. body
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.

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" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "field": "string",  "mapping": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "organization_assign_default": true}'
Example Response200
{  "field": "string",  "mapping": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "organization_assign_default": true}