Step 7: Create a user
POST {{apiPath}}/environments/{{envID}}/users
This example shows the POST /environments/{{envID}}/users
operation to create a new user.
In this request:
{{envID}}
represents your environment ID.The request body includes:
- The population ID that you created in a prior step. The
{{samlPopID}}
placeholder variable in the request body represents the population ID. email
. The unique email address for the new user.username
. A name for the new user that must be unique within the specified environment.type
. A value that has no special meaning in PingOne but can be used to categorize or filter users. In this workflow, the value of this property is set toSAMLuser
. Any user of this type is assigned membership to the group you created in the previous step.
- The population ID that you created in a prior step. The
The response returns a
Status: 201 created
message and shows the new user's coniguration data.The response data includes the user's
id
property, which is needed to set the new user's password in the next step.
See the following topics to learn more about users:
Request Body
{"email"=>"my.email@pingidentity.com", "type"=>"SAMLuser", "name"=>{"given"=>"Test", "family"=>"SAMLUser"}, "population"=>{"id"=>"{{samlPopID}}"}, "username"=>"saml_user_{{$timestamp}}"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string | ||
Content-Type | string |