Importing user accounts with a password

When an Import of a user account (see Users) is performed, the password can be defined by a plain text defined in the mapping of the import profile.

  • When assigning to the password attribute field (passwordHash_attr) of the User object, the text "plain:" must be prefixed so that the following actual password string is encrypted during import.

CAUTION

  • Without the prefix "plain:" the assigned string would be considered as an already encrypted value and adopted directly. In this case the input of the assigned string does not work at login.

  • Since an 'empty string' (as opposed to a space) is not allowed as a password, the import for a user account fails if the password attribute field (passwordHash_attr) is assigned only the string "plain:".

Example

A profile that is given the username (username) of an existing user account as a source structure should set the Users concerned to 'Active' and 'Reset' their password by assigning the username as the (initial) password.

The following screenshot shows the required mapping for a Single import, in which the concat()function concatenates the prefix plain plain: with the username from the linked source field:

images/download/attachments/58596111/image2020-9-25_13-42-48-version-1-modificationdate-1601034170130-api-v2.png

NOTE◄

  • The user account to be reset is also identified by the username in the search-node not expanded here (see XML example below) (see Single import).

  • If several user names are to be reset via the same source file, a Batch import must be used.

Runtime example

For a TEST user name, the profile results in the following Import:

?xml version="1.0" encoding="UTF-8"?>
<core:Import ... action="UPDATE">
<search>
<core:SimplePropertySearch projection="username" compareType="==" stringValue="TEST"></core:SimplePropertySearch>
</search>
<base:User active="true" passwordHash="plain:TEST">
</base:User>
</core:Import>
  • The TEST user can then log in with the password TEST if the account already exists.