POST/scim_directories/{scim_directory_id}/group_role_mappings

Create a SCIM group role mapping

Creates a new SCIM group to organization role mapping for a directory. Mappings can be created while group role mapping is disabled on the directory, but they only take effect once it is enabled.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 3 body fields
scim_directory_idstringrequired
The ID of the directory.
scim_group_idstringrequired
The SCIM group ID from the identity provider.
role_idstringrequired
The ID of the organization role to assign to members of the SCIM group.
precedenceintegeroptional
The precedence for this mapping. Lower values take priority when a user belongs to multiple mapped groups. If omitted, the mapping is appended with the next-highest precedence.

6 status codes
200A SCIM group role mapping
objectstringrequired
String representing the object's type. Always "scim_group_role_mapping".
Allowed:scim_group_role_mapping
idstringrequired
Unique identifier for the SCIM group role mapping.
scim_directory_idstringrequired
The ID of the directory this mapping belongs to.
directory_idstringrequired
The ID of the directory this mapping belongs to. Same value as `scim_directory_id`.
scim_group_idstringrequired
The SCIM group ID from the identity provider.
directory_group_idstringrequired
The group ID from the identity provider. Same value as `scim_group_id`.
scim_group_display_namestringrequired
The display name of the SCIM group, as reported by the identity provider.
directory_group_display_namestringrequired
The display name of the group, as reported by the identity provider. Same value as `scim_group_display_name`.
roleobjectoptional
precedenceintegerrequired
Mapping precedence, starting at 1. Lower values take priority when a user belongs to multiple mapped groups.
created_atintegerrequired
Unix timestamp (milliseconds) of when the mapping was created.
updated_atintegerrequired
Unix timestamp (milliseconds) of when the mapping was last updated.
400Request was not successful
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
401Authentication invalid
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
403Authorization invalid
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
404Resource not found
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
422Invalid request parameters
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional

Error handling

A 400 is returned: Request was not successful. A 401 is returned: Authentication invalid. A 403 is returned: Authorization invalid. A 404 is returned: Resource not found. A 422 is returned: Invalid request parameters.