Add a claim mapping

Prev Next
Post
/v1alpha/sso/claim_mappings

Creates a new claim mapping for the workspace. A claim mapping describes how the value of a specific user attribute in the IdP will be translated into a role in Torq when using single sign-on. For example, add a claim with the name groups that will assign each user in the IdP group engineers (claim value) the Contributor role in Torq. Claims are applied in order, and a user is assigned a role based on the first match found, while subsequent mappings are disregarded.

Security
HTTP
Type bearer
Body parameters
object
claim_name
string Required

The name of the claim to add.

Exampleemail
claim_value
string Required

The value of the claim to add.

Exampleuser@company.io
role_id
string (uuid) Required

The ID of the role in Torq the claim will be mapped to. To get a list of user role IDs make a List roles request.

Example74e19393-3e94-48d2-8b60-26f2d2665942
Responses
200

A successful response.

object
id
string (uuid)

The unique identifier of the claim mapping.

Exampleb7a6c3f0-5d6a-4b3b-8f9a-103c4d5e6f7a
claim_name
string

The name of the claim.

Exampleemail
claim_value
string

The value of the claim.

Exampleuser@company.io
role_id
string (uuid)

The ID of the role in Torq the claim is mapped to.

Exampleb7a6c3f0-5d6a-4b3b-8f9a-103c4d5e6f7a
rank
integer (int64)

The rank of a claim mapping determines its position in the ordered list of mappings, ranging from 1 to n. For instance, given the claim mappings list [a, b, c, d, e], updating the rank of claim c to 2 would result in the updated list: [a, c, b, d, e]. Claims are applied in order. A user is assigned a role according to the first match found and subsequent mappings are ignored.

Example2
401

Invalid bearer token. If you receive this message more than once try creating a new Client ID/Client Secret or generating a new bearer token.

object
403

You don't have permission to access this resource.

object