Create User Import External Password

POST {{apiPath}}/environments/{{envID}}/users

For user import operations in which the imported user's password remains on the external directory (and is not imported into PingOne), the import action uses the password.external.gateway configuration to designate that the user's authoritative password is managed by an external service.

Note: For passwords with password.external.gateway configured, the user's password status state is set to EXTERNAL.

The POST /environments/{{envID}}/users operation imports a new user resource to the specified environment. This operation uses the application/vnd.pingidentity.user.import+json custom content type in the request header.

New users must be assigned to a population resource identified by its ID, and the request must set a value for the username attribute. The username attribute must be unique to an environment (spanning populations). Access to populations is determined by roles. It's possible that username conflicts may arise, if you or your worker application attempt to create a user that exists in a population to which you have no access.

The password property sets the attributes needed to specify an external directory as the password manager. For this use case, the password property configures the following sub-properties:

Prerequisites

PropertyTypeRequired?
password.externalObjectRequired
password.external.gatewayObjectRequired
password.external.gateway.idUUIDRequired
password.external.gateway.typeStringOptional
password.external.gateway.userTypeReferenceRequired
password.external.gateway.userType.idUUIDRequired
password.external.gateway.correlationAttributesObjectRequired

For more information about gateways LDAP data model and gateway user types, see Gateway Management.

Request Body

{"population"=>{"id"=>"{{popID}}"}, "username"=>"myRemoteUser-1", "password"=>{"external"=>{"gateway"=>{"id"=>"{{gatewayID}}", "userType"=>{"id"=>"{{userTypeID}}"}, "correlationAttributes"=>{"uid"=>"{{username}}"}}}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: Created

{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"population":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/populations/f22842c9-f1eb-41a5-8072-20041b609cf1"},"devices":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32/devices"},"roleAssignments":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32/roleAssignments"},"password":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32/password"},"password.reset":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32/password"},"password.set":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32/password"},"password.check":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32/password"},"password.recover":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32/password"},"linkedAccounts":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32/linkedAccounts"},"user.verify":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32"},"account.sendVerificationCode":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32"},"memberOfGroups":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/01dee5b5-48fa-4a6b-a574-f2ff28ab5b32/memberOfGroups"}},"id":"01dee5b5-48fa-4a6b-a574-f2ff28ab5b32","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"account":{"canAuthenticate":true,"status":"OK"},"createdAt":"2022-06-07T22:48:14.677Z","email":"joe@pingidentity.com","enabled":true,"identityProvider":{"type":"PING_ONE"},"lifecycle":{"status":"VERIFICATION_REQUIRED"},"mfaEnabled":false,"name":{"given":"Test","family":"User"},"population":{"id":"f22842c9-f1eb-41a5-8072-20041b609cf1"},"updatedAt":"2022-06-07T22:48:14.677Z","username":"import-user_1654642094","verifyStatus":"NOT_INITIATED"}