Add a User through a Registration Flow
This activity shows you how to create a sign-on policy with registration enabled, initiate an authorization request, and use the flow APIs to create and verify a new user account.
The following operations are supported by the PingOne APIs:
-
Create an application
-
Create a sign-on policy
-
Initiate an authorize request
-
Use flow APIs to create a new user
-
Use flow APIs to verify the new user
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 new user through a registration flow, the following tasks must be completed successfully:
-
Make a
POSTrequest to/environments/{{envID}}/applicationsto add a new application to the specified environment. -
Make a
POSTrequest to/environments/{{envID}}/populationsto create a new population for the reistered user. -
Make a
POSTrequest to/environments/{{envID}}/signOnPoliciesto create a new sign-on policy that enables user registration. -
Make a
POSTrequest to/environments/{{envID}}/signOnPolicies/{{policyID}}/actionsto define the registration action associated with this sign-on policy. -
Make a
POSTrequest to/environments/{{envID}}/applications/{{appID}}/signOnPolicyAssignmentsto create associate the registration sign-on policy with the application. -
Make a
GETrequest to/{{envID}}/as/authorizeto obtain an authorization grant. This request starts the authorization flow. -
Make a
GETrequest to/{{envID}}/flows/{{flowID}}to get the flow. -
Make a
POSTrequest to/{{envID}}/flows/{{flowID}}to register the new user. -
Make a
POSTrequest to/{{envID}}/flows/{{flowID}}to verify the new user account. -
Make a
GETrequest to/environments/{{envID}}/users/{{userID}}to verify that the new user exists in the PingOne directory.
Click the Run in Postman button below to fork, or download and import, the Postman collection for this workflow to your workspace.