Create user group

Manual groups: filters is the same filter language as GET /users takes, always as filter groups ([{ "filters": [...] }] for one AND list). A key is one of the built-in keys its description lists, or an integration field from customFields in GET /users/metadata; its predefinedFields include keys groups refuse. A refused key, operator or value comes back as INVALID_FILTER, naming each filter. Count the members with GET /userGroups/stats first.

IdP groups: find the group with GET /userGroups/idpGroupOptions. If its idUserGroup is set, use it; if not, create it with type: 'idp' and idpGroup: { idApp, groupName }, with idApp from its identity provider's entry. Returns 201 when it creates the group, and 200 with the existing group when one exists.

A name that isn't in GET /userGroups/idpGroupOptions is still accepted, and has no members until a sync brings them in: confirm its exact spelling with the user first. Okta groups imported from AD or LDAP, and memberships through nested groups, aren't synced, so such a group stays empty.

USER_GROUP_NAME_TAKEN (409) names the group that has the name in details.idUserGroup.

  • Rate limit: 30 requests per minute

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum
required

manual: its members are the users its filters match. idp: its members are the members of a group in an identity provider.

Allowed:
string
length between 1 and 255

Required for type: 'manual'. For type: 'idp', read-only and ignored: the server builds it from idpGroup.

filters
array of objects
length between 1 and 50

Required for type: 'manual'; not allowed for type: 'idp'. Filter groups: a user is a member when they match every filter of at least one group.

filters

A group of filters, all of which a member matches.

string
^group-\d+$

Optional. The server assigns one when omitted; a sent id is kept.

filters
array of objects
required
length between 1 and 50

Filters a member matches all of.

filters*
integer
≥ 1

Optional. The server assigns one when omitted; a sent id is kept.

string
required

A built-in key (fullName, email, activeAppsCount, additionalEmails, numberOfOwnedApps, numberOfStakeholderApps, ownedApps.name, stakeholderApps.name, isDeletedInIdentitySources, isAppOwner, annualCostConverted, countryName, userType, isExternal) or the key of one of the org's integration fields, from customFields in GET /users/metadata. A user-type field takes <key>.id, or the key itself.

string
enum
required

One of the operators the field's type takes. Built-in keys:

  • fullName: contains, notContains, startsWith, endsWith, isSet, isNotSet, equals, notEquals, anyOf, noneOf
  • email: equals, notEquals, contains, notContains, startsWith, endsWith, isSet, isNotSet
  • activeAppsCount, numberOfOwnedApps, numberOfStakeholderApps: gt, gte, lt, lte, equals, notEquals, isSet, isNotSet
  • additionalEmails, ownedApps.name, stakeholderApps.name, countryName: anyOf, allOf, isExactly, noneOf, contains, notContains, isSet, isNotSet
  • isDeletedInIdentitySources, isAppOwner, isExternal: equals
  • annualCostConverted: gt, gte, lt, lte, equals, notEquals
  • userType: equals, notEquals, isSet, isNotSet, contains, notContains, startsWith, endsWith, anyOf, noneOf
    Integration fields, by their type in GET /users/metadata:
  • datePicker: dayAfter, dayOnOrAfter, dayBefore, dayOnOrBefore, relativeDateMore, relativeDateOn, relativeDateLess, relativeDateToday, isSet, isNotSet
  • email, singleLine, multiValueString: equals, notEquals, isSet, isNotSet, contains, notContains, startsWith, endsWith, anyOf, noneOf
  • user: equals, notEquals, isSet, isNotSet, anyOf, noneOf
  • number: gt, gte, lt, lte, equals, notEquals, isSet, isNotSet
string

Depends on op:

  • isSet, isNotSet, relativeDateToday, exists, notExists: none
  • contains, notContains, startsWith, endsWith: a string
  • equals, notEquals: a string, number or boolean
  • gt, gte, lt, lte: a number
  • anyOf, noneOf, allOf, isExactly: an array of 1–100 strings or numbers
  • dayAfter, dayOnOrAfter, dayBefore, dayOnOrBefore: a date as YYYY-MM-DD
  • relativeDateMore, relativeDateOn, relativeDateLess: { number, unit?: "day" | "week" | "month" | "year", type: { value: "ago" | "from" } }, in days without unit
    A user-type field takes user ids. A currency field takes whole cents. A yes/no field takes true or false.
idpGroup
object

Required for type: 'idp'; not allowed for type: 'manual'. The IdP group whose synced members are this group's members: its app, the user field that holds its members' groups, and its name in the IdP, as Torii's synced user data holds them. Not one of the groups an access request policy adds requesters to (provisioningMethodData.groups in GET /appCatalog/accessRequestPolicies): those come from the IdP itself and are identified by the IdP's group id, so neither list's values work in the other.

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json