Create a Group and Add a User
This activity shows you how to create a group and assign a user to that group.
Prerequisites
Get an access token from the worker application that you created in Create an admin Worker app connection. To get a token from a different worker application in an alternate sandbox environment, run the token request endpoint using the client ID and client secret of your chosen worker app to authenticate the request. For more information, refer to Get a PingOne admin access token.
Workflow order of operations
To create a group and add a user, you must complete the following tasks:
-
Make a
POSTrequest to/environments/{{envID}}/groupsto create a new group. -
Make a
POSTrequest to/environments/{{envID}}/populationsto create a new population resource. -
Make a
POSTrequest to/environments/{{envID}}/usersto create a user to assign to the new population resource. -
Make a
POSTrequest to/environments/{{envID}}/users/{{GroupUseCaseUserID}}/memberOfGroupsto add the new user to the group. -
Make a
GETrequest to/environments/{{envID}}/users?filter=memberOfGroups[id eq "{{UseCaseGroupID}}"]to return a list of all users in the group. -
Make a
GETrequest to/environments/{{envID}}/users/{{GroupUseCaseUserID}}?include=memberOfGroupNamesto return a list of all groups associated with the specified user.
Click the Run in Postman button below to fork, or download and import, the Postman collection for this workflow to your workspace.