PingOne Platform APIs

Groups

The Groups service enables you to create collections of users having the same access to applications. You can create up to 100,000 groups per environment. There is no limit to the number of users that can belong to a group.

Groups permissions

If you have the Identity Data Admin role, you can perform the following operations using the PingOne APIs:

  • Create, read, update, and delete groups

  • Add users to groups

  • Delete users from groups

  • Read group memberships

If you have the Environment Admin or Client Application Developer role, you can read groups.

Creating groups

By default, groups are created per environment. Groups can also optionally be created per population. Do this by specifying a value for population.id in the body of POST {{apiPath}}/v1/environments/{{envID}}/groups. The population.id property is read-only after it is initially set and can be set in POST {{apiPath}}/v1/environments/{{envID}}/groups only.

Once a group is created, the following conditions apply:

You cannot move the group:

  • From one population to another

  • From a population to an environment

  • From an environment to a population

If a user’s population changes, they are also removed from any group that contains them for this population.

Learn more about creating groups in Creating a group, in the PingOne Admin Guide. Learn more about assigning users to groups in Group Membership.

Nesting groups

You can nest one group inside another. The members of the nested group dynamically become members of the parent group. Do this by specifying the ID of a group within the body of a POST {{apiPath}}/v1/environments/{{envID}}/groups/{{groupID}}/memberOfGroups operation. Nesting a group essentially creates a child-parent relationship where members of the "child" group inherit the same properties and permissions as the "parent" group.

For example, assume an environment has three groups: Group A, Group B, and Group C. Each group has access to a single application: Group A has access to App1, Group B has access to App2, and Group C has access to App3.

  • If you nest Group B inside of Group A, then users in Group B will now have access to App1 and App2, and Group A will still only have access to App1.

  • If you nest Group C into Group B, then Group C members will inherit access to App1 (via the nested relationship of Group B to Group A), inherit access to App2 (via the nested relationship of Group C to Group B), and will retain access to App3.

Group A - App1
    Group B - App1 & App2
        Group C - App1, App2, App3
[source]
  • You cannot nest an environment-level group inside a population-level group.

  • You cannot nest groups with admin roles assigned.

Learn more about nested groups in Nested groups, in the PingOne Admin Guide.

Creating circular references

You can nest parent groups inside their child groups. Continuing the example from the last section, let us assume you have another group, Group D. Group D has access to App4.

  • If you nest Group D in Group B, Group D inherits access to Group A and Group B apps.

  • If you nest Group B in Group D, creating a circular reference, then both Group B and Group C inherit access to App4.

Group A - App1
    Group B - App1 & App2, App4
        Group C - App1, App2, App3, App4
        Group D - App1, App2, App4
            Group B - App1, App2, App4

Removing nested relationship

Use the DELETE {{apiPath}}/v1/environments/{{envID}}/groups/{{groupID}}/memberOfGroups/{{nestedGroupID}} operation to remove the nested relationship between two groups. Members directly assigned to each group remain unchanged.

Searching for group membership

Documentation for the following group membership searches can be found under Users/Group Membership:

Learn more about searching for groups in Searching for groups, in the PingOne Admin Guide.

Filtering groups searches

You can filter groups GET collection responses by applying a SCIM filtering expression to the request URL. For large collections, a filter expression appended to the query returns a targeted, more useful data set.

The SCIM operators eq (equals), sw (starts with), and, and or can be used with the following group properties:

  • name

  • externalId

The SCIM operators eq (equals), and sw (starts with) can be used with the group property:

  • displayName

The SCIM operator eq (equals) can be used with the following group properties:

  • id

  • population.id

  • sourceId (only for external groups)

For more information refer to Paging and ordering collections.

You can also use SCIM filters with GET collection requests that return user data. Refer to Users for the user properties and operators supported.

Assigning admin roles and permissions to this service

Admin role assignments determine access to PingOne APIs. When assigning admin roles to this service, refer to PingOne Permissions by Service for the service-specific permissions.

You can also choose to assign admin roles based on particular service resources. Refer to PingOne Permissions by Resource when assigning admin roles per service resources.

Admin assignments to roles are set by:

Refer to Roles Management for more information.

Groups data model

Property Type Required Mutable Description

customData

JSON blob

Optional

Mutable

User-defined custom data.

description

String

Optional

Mutable

The group description.

displayName

String

Optional

Mutable

For Just In Time (JIT) creation of external groups, it’s set when a user is created or updated with memberOfExternalGroups[].name. Refer to the Users data model for more information. For internal groups it is identical to name. Groups can be filtered by displayName.

directMemberCounts

Object

Optional

Immutable

An object containing a users (int) property. This property lists the number of users explicitly added to the group with POST {{apiPath}}/v1/environments/{{envID}}/users/{{userID}}/memberOfGroups. Since these members were explicitly added to the group, they can be removed from the group with DELETE {{apiPath}}/v1/environments/{{envID}}/users/{{userID}}/memberOfGroups/{{groupID}}.

environment.id

String

Required

Immutable

The unique identifier for the environment.

externalId

String

Optional

Mutable

A user-defined identifier for the group. Use this property to synchronize a group in PingOne with the same group in an external system. PingOne does not directly use this property. Search all groups for a specific external ID with a SCIM filter using GET {{apiPath}}/v1/environments/{{envID}}/groups.

id

String

Required

Immutable

The unique identifier for the group. Search all groups for a specific group ID with a SCIM filter on GET {{apiPath}}/v1/environments/{{envID}}/groups. Retrieve all the group IDs associated with a user with GET {{apiPath}}/v1/environments/{{envID}}/users/{{userID}}?include=memberOfGroupIDs.

isAdmin

Boolean

N/A

Read-only

true indicates that admin role assignments are present for this group.

name

String

Required

Immutable

The group name. A group name can be reused across populations, but the same user cannot belong to multiple groups with the same group name. Population groups cannot share a group name with an environment group. Search all groups for a specific group name with a SCIM filter on GET {{apiPath}}/v1/environments/{{envID}}/groups. Retrieve all the group names associated with a user with GET {{apiPath}}/v1/environments/{{envID}}/users/{{userID}}?include=memberOfGroupNames. Use this operation to determine group membership in attribute mappings for claims and assertions.

population.id

String

Optional

Immutable

The unique identifier for the population. Set this property during group creation only. If set, membership to the group is restricted to a single population. For more information, refer to Creating groups. Search all groups for a specific population ID with a SCIM filter on GET {{apiPath}}/v1/environments/{{envID}}/groups.

sourceId

String

Optional

Immutable

For Just In Time (JIT) creation of external groups, it’s set when a user is created or updated with memberOfExternalGroups[].sourceId. Refer to the Users data model for more information. Groups that are provisioned set this property when the groups are created. Groups can be filtered by sourceId.

sourceType

String

Optional

Immutable

For Just In Time (JIT) creation of external groups, it’s set when a user is created or updated with memberOfExternalGroups[].sourceType. Currently, this can be only "GATEWAY" or "IDP". Refer to the Users data model for more information.

totalMemberCounts

Object

Optional

Immutable

An object containing a users (int) property. This property lists the total number of users added to the group. You must use GET {{apiPath}}/v1/environments/{{envID}}/groups/{{groupID}} with the include=totalMemberCounts query parameter to retrieve this property. This property is not returned with a list of groups.

type

String

Optional

Immutable

Defines the relationship of nested group membership: DIRECT or INDIRECT.

userFilter

String

Optional

Mutable

A SCIM filter that determines which users are dynamically added to the group. Can only be used to add members of non-admin groups. For more information, refer to Group Membership.

Group events generated

Refer to Audit Reporting Events for the events generated.

Groups response codes

Code Message

200

Successful operation.

201

Successfully created.

204

Successfully removed. No content.

400

The request could not be completed.

401

You do not have access to this resource.

404

The requested resource was not found.

Group errors

In addition to the general error codes, group operations can return the following errors:

HTTP status Top‑level code Detail code When it happens and what the response contains

400

INVALID_DATA

EMPTY_VALUE or INVALID_VALUE

Message: Validation Error : [<field> <message>] for bean‑validation failures, or The request could not be completed. One or more validation errors were in the request. when the service rejects an omitted name

When and details

When: A POST or PUT /groups request omits name, provides an empty name, description, externalId, or displayName that is empty or exceeds its size limit (displayName must be 1‑256 characters, externalId at most 1024), or includes blacklisted patterns such as <script or ${

Details: must not be null for an omitted name, size must be between 1 and 256 for an empty or over-length name, must be between 1 and 256 characters for an empty or over-length displayName, must not be empty for an empty description, size must be between 1 and 1024 for an empty or over-length externalId, must not contain blacklisted patterns for a name, displayName, or externalId that includes a blacklisted pattern, or:

must contain only Unicode letters, marks, numbers, spaces, forward slashes, dots, semi-colons, square brackets, apostrophes, underscores, or hyphens

for a name with disallowed characters, for example Validation Error : [name size must be between 1 and 256]

400

INVALID_DATA

UNIQUENESS_VIOLATION

Message: The request could not be completed. One or more validation errors were in the request.

When and details

When: A POST /groups request creates a group with a name that duplicates an existing group in the environment or population, or a PUT /groups/{ID} request renames the group to one that does. Only groups in different populations can have the same name

Details: A group with the specified name already exists. with target name on create, or A group with the specified name already exists. Only groups in different populations can have the same name. with target name on rename

400

INVALID_DATA

INVALID_VALUE

Message: The request could not be completed. One or more validation errors were in the request.

When and details

When: A POST or PUT /groups request attempts to create or update an external or provisioned group from the standard group endpoint, or omits sourceType or sourceId from an external group creation request, or provides a displayName without which an external group cannot be created

Details: Cannot create an external group from this endpoint., Cannot create a group without a sourceType from the External Group Creation endpoint., Cannot create a group without a sourceId from the External Group Creation endpoint., or Cannot create an External Group without a displayName.

400

REQUEST_FAILED

CONSTRAINT_VIOLATION

Message: The request could not be completed. There was an issue processing the request.

When and details

When: A POST /groups request would exceed the maximum number of groups per environment (100,000 by default), provides customData larger than the size limit, or requests a dynamic group (userFilter) in an environment configured for a high group count

Details: Cannot create more than <maximum> groups per environment., Cannot create a group with customData larger than 10 KB, or Dynamic groups are disabled in this environment as it is configured for a high group count.

400

REQUEST_FAILED

CONSTRAINT_VIOLATION

Message: The request could not be completed. There was an issue processing the request.

When and details

When: A POST or PUT /groups request sets isAdmin or isAccessRequestGroup directly, sets userFilter on an access request group, or a DELETE /groups/{ID} request targets an access request group

Details: The isAdmin attribute is not editable and is only updated when the group’s roles are added or removed., The isAccessRequestGroup attribute cannot be set directly. Use the Access Request group endpoint., The userFilter attribute cannot be set on an access request group., or Access request groups cannot be deleted.

400

REQUEST_FAILED

CONSTRAINT_VIOLATION

Message: The request could not be completed. There was an issue processing the request.

When and details

When: A POST /users/{userID}/memberOfGroups request adds a user to a group with more than 10,000 memberships, a POST /groups/{groupID}/memberOfGroups request exceeds the nested group size limit of 250 nested groups or the environment nested membership limit, or nests a group inside an external group, or an environment configured for a high group count receives a nested‑group request

Details: Membership count for this group has exceeded 10,000., Number of nested groups has exceeded the size limit of <maximum>, Nested membership count for this environment has exceeded the limit of <maximum>, Cannot create a membership for a group within an external group, or Nested groups are disabled in this environment as it is configured for a high group count.

400

REQUEST_FAILED

CONSTRAINT_VIOLATION

Message: The request could not be completed. There was an issue processing the request.

When and details

When: A POST /users/{userID}/memberOfGroups request adds a user to a JIT external group, or a POST /groups/{groupID}/memberOfGroups request nests an environment group inside a population group, or nests groups that include an administrator group

Details: Cannot create a membership for a user within an external group (target memberOfGroupIDs), Cannot add an environment group to a population group, or You cannot create a group membership that includes an administrator group.

400

REQUEST_FAILED

INVALID_VALUE

Message: The request could not be completed. One or more validation errors were in the request.

When and details

When: A POST /users/{userID}/memberOfGroups request adds a user to a group in a different population, or a POST /groups/{groupID}/memberOfGroups request nests a group into a group in a different population, nests a group into itself, or references a nesting group that does not exist

Details: Cannot add a user to a group in a different population, Cannot add a group to another group in a different population, Cannot add a group to itself (detail INVALID_VALUE on the nested‑group endpoint; the same self‑nesting check inside the service returns detail CONSTRAINT_VIOLATION), or Group does not exist groupId=<groupId>

400

REQUEST_FAILED

INVALID_FILTER or INVALID_VALUE

Message: The request could not be completed. There was an issue processing the request. for a userFilter error, or The request could not be completed. One or more validation errors were in the request. for a collection filter error

When and details

When: A POST or PUT /groups request provides a userFilter SCIM filter expression that is invalid, or sets userFilter on an admin group, or a GET /groups request uses a filter expression that cannot be parsed, references an attribute that does not support filtering, or contains an unsupported operator

Details: For a dynamic group filter, detail INVALID_FILTER with target userFilter carrying the underlying filter message or Invalid Filter: <userFilter>, or The userFilter property cannot be used to populate an admin group and must be empty. with target value. For collection filters, The value provided is invalid with target value, Invalid filter: <underlying message> with target value, The filter operator was invalid or not supported. with target operator, or The filter attribute was invalid or does not support filtering. with target attribute.

400

REQUEST_FAILED

INVALID_PARAMETER

Message: The request could not be completed. There was an issue processing the request.

When and details

When: A GET /groups or GET /users/{userID}/memberOfGroups request has a limit query parameter less than 1 or greater than 1000, or an unsupported expand option

Details: Must be between 1 and 1000 (on GET /groups; the same check on GET /users/{userID}/memberOfGroups and GET /groups/{groupID}/memberOfGroups returns must be between 1 and 1000) or <expand> is not a valid expand option. Valid options: group

403

ACCESS_FAILED

None

Message: The actor attempting to perform the request is not authorized.

When and details

When: The actor lacks the dir:create:group permission (POST), the dir:read:group permission (GET), the dir:update:group or dir:provision:group permission (PUT), the dir:delete:group permission (DELETE), or the dir:create:groupMembership, dir:create:bulkGroupMembership, dir:delete:groupMembership, or dir:delete:bulkGroupMembership permission (membership operations), or the actor is population‑ or group‑scoped and is not authorized for the target resource

Details: None.

401

ACCESS_FAILED

None

Message: You cannot add or remove yourself from an admin group. or You can’t delete administrator groups that you belong to.

When and details

When: A POST /users/{userID}/memberOfGroups request adds the actor themselves to an administrator group (or removes themselves from one), or a DELETE /groups/{ID} request deletes an administrator group the actor belongs to

Details: None. The delete guard applies only when the actor is a USER; a CLIENT actor can delete any admin group.

404

NOT_FOUND

None

Message: The request could not be completed. The requested resource was not found.

When and details

When: A GET, PUT, or DELETE /groups/{ID} request references a group or an environment that does not exist, or a POST /users/{userID}/memberOfGroups request references a nested group that does not exist

Details: None.

Related topics