Skip to content

Map an identity provider group to a group

POST
/user-groups/{group}/idp-mappings
curl --request POST \
--url https://example.com/api/v1/user-groups/night-shift/idp-mappings \
--header 'Content-Type: application/json' \
--data '{ "claim_value": "example", "issuer": "example" }'

Maps a value of the identity provider’s groups claim to this group, so a person whose token carries it becomes an idp member at their next sign-in and inherits the group’s grants. The issuer defaults to the configured provider’s; with none configured and none given it is a 422. Refused (409) when the group carries an owner grant at any scope, since no provider group may reach an owner, and when the group already maps the value. Gated by user_group:update (all-scope). Under an agent token or the agent ceiling, refused (403) when the group’s grants exceed the caller’s bounded permissions, as adding a member is.

group
required

The group, by name or uuid

string

The group, by name or uuid

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
claim_value
required

The value of the identity provider’s groups claim that puts a person in this group

string
>= 1 characters <= 512 characters
issuer

The identity provider’s issuer, exactly as its tokens carry it; omit for the configured provider’s

string
<= 2048 characters

Created

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
claim_value
required

A value of the provider’s groups claim

string
created_at
required
string format: date-time
group
required

The group’s name, for display

string
group_id
required

The group’s uuid, the handle

string
id
required
string
issuer
required

The identity provider’s issuer the claim value is read from

string

Example

{
"$schema": "/api/v1/schemas/GroupMappingBody.json"
}

Error

Media type application/problem+json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}