Update organization IdP Sync mapping
PATCH
CoderSessionTokenheader
Coder-Session-Token<token>Description of the mappings to add and remove
application/json- body
add?array<>remove?array<>OK
application/json- response
field?stringField 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?booleanAssignDefault 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/mapping" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "add": [ { "gets": "string", "given": "string" } ], "remove": [ { "gets": "string", "given": "string" } ]}'Example Response200
{ "field": "string", "mapping": { "property1": [ "string" ], "property2": [ "string" ] }, "organization_assign_default": true}