Skip to content
Skip to Content
Coder Docs

Update role IdP Sync settings by organization

PATCH
/api/v2/organizations/{organization}/settings/idpsync/roles

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

organization*string

Organization ID

Formatuuid

Request Body

New settings

application/json
  1. body
field?string

Field is the name of the claim field that specifies what organization roles a user should be given. If empty, no roles will be synced.

mapping?

Mapping is a map from OIDC groups to Coder organization roles.

Response Body

OK

application/json
  1. response
field?string

Field is the name of the claim field that specifies what organization roles a user should be given. If empty, no roles will be synced.

mapping?

Mapping is a map from OIDC groups to Coder organization roles.

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

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