Map an identity provider group to a group
const url = 'https://example.com/api/v1/user-groups/night-shift/idp-mappings';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"claim_value":"example","issuer":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The group, by name or uuid
The group, by name or uuid
Request Bodyrequired
Section titled “ Request Bodyrequired ”object
A URL to the JSON Schema for this object.
The value of the identity provider’s groups claim that puts a person in this group
The identity provider’s issuer, exactly as its tokens carry it; omit for the configured provider’s
Responses
Section titled “ Responses ”Created
object
A URL to the JSON Schema for this object.
A value of the provider’s groups claim
The group’s name, for display
The group’s uuid, the handle
The identity provider’s issuer the claim value is read from
Example
{ "$schema": "/api/v1/schemas/GroupMappingBody.json"}default
Section titled “ default ”Error
object
A URL to the JSON Schema for this object.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
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"}