Add a User through a Registration Flow
Number of APIs: 9
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 Getting Started with the PingOne APIs. 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, see GET a Worker Application 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/{{signOnPolicyID}}/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/to verify that the new user exists in the PingOne directory.
- 
Step 9: Verify user POST {{authPath}}/{{envID}}/flows/{{flowID}} 
- 
Step 1: Create an application POST {{apiPath}}/environments/{{envID}}/applications 
- 
Step 2: Create a population for registered users POST {{apiPath}}/environments/{{envID}}/populations 
- 
Step 3: Create the new sign-on policy POST {{apiPath}}/environments/{{envID}}/signOnPolicies 
- 
Step 4: Create the sign-on policy action with registration enabled POST {{apiPath}}/environments/{{envID}}/signOnPolicies/{{registrationPolicyID}}/actions 
- 
Step 5: Assign the sign-on policy to an application POST {{apiPath}}/environments/{{envID}}/applications/{{RegistrationAppID}}/signOnPolicyAssignments 
- 
Step 6: Send the authorization request GET {{authPath}}/{{envID}}/as/authorize?response_type=code&redirect_uri=https://www.example.com&scope=openid profile&client_id={{RegistrationAppID}} 
- 
Step 7: Get the flow GET {{authPath}}/{{envID}}/flows/{{flowID}} 
- 
Step 10: Get users GET {{apiPath}}/environments/{{envID}}/users