Regenerate the password of an Alfabet user

The endpoint regeneratepassword provide a means to reset the password of one or multiple users or to create an initial password for new users. A password is automatically assigned to the users and the users are informed about the login credentials via email.

This functionality includes sending emails to the user via the system. Make sure that an email address is defined for the users prior to using the functionality.

Endpoint name: regeneratepassword

HTTP method: POST

Service call: URLOfTheAlfabetAPIServer/api/v2/regeneratepassword

Authorization Header Field: Authorization:TypeValue

Click for details about authorization.

Additional Header Fields: Content-Type: application/json; charset=utf-8

Body: The body is a JSON object with the following structure:

Field Mandatory/Optional Required Value
"Refs":["RefstrOfObject","RefstrOfObject"] Optional An array containing one or multiple values of the REFSTR property of the users (object class Person ) in the Alfabet database for which the password should be regenerated.
"UserNames":["UserNameOfUser","UserNameOfUser"] Optional An array containing one or multiple user names of users for which the password should be regenerated.
"CurrentProfile":"Portfolio Admin" Mandatory The user profile is used to evaluate whether the Alfabet user used for authorization has the permissions to edit the user data. The Portfolio Admin user profile must be specified to execute user password regeneration.
"CurrentCulture": "LCIDDecimal" Optional The language code (LCID) decimal of the culture that shall be used for messages in the return value. The culture must be a culture for which translations are available in Alfabet. By default, the messages in the return value are English.

Return value: The return value is a JSON object with one field "ResultMessages" that provides information about the success status in one field per user in the format "REFSTR of user":"Message" or "User Name": "Message".

RESTful Service call:

Service call: https://AlfabetCloud/AlfabetAPIServer/api/v2/regeneratepassword

HTTP method: PUT

Headers:

  • Authorization: bearer eyJ0eXAiOiJKVxMiJ9.eyJpc3MiOiJhbGZhYmV0IiwiaWF0IjoiMTU3MzAzMjA0NiIsImV4cCI6IjE1NzMwMzMyNDYiLCJxc2giOm51bGwsInN1YiI6IkFwaSBBdXRoZW50aWNhdGlvbiIsImNvbnRleHQiOnsidXNlciI6eyJVc2VyS2V5IjoiQUxGQUJFRDRUNGNc1R5cGUiOjB9fX0.PJC0EWtlUETbraV7NckVkRTFVm356y6K9JyhFR245hXp-2ApttryATZ_dAL0bi_GZpeJx7iqr_lRIA
  • Content-Type: application/json; charset=utf-8

Body:

  • {
  • "CurrentProfile": "Portfolio Admin",
  • "CurrentCulture": "1033",
  • "Refs": ["421-2518-0","421-3-0"],
  • "UserNames:["CUSTOMER","CLIENTE"]
  • }

The service call requests password regeneration for four different users. A user with the first specified REFSTR does not exist.

Response of the service call:

  • {
  • "ResultMessages": {
    • "421-2518-0": "User not found",
    • "421-3-0": "Password successfully changed.",
    • "CUSTOMER": "Password successfully changed.",
    • "CLIENTE": "Password successfully changed."
    • }
  • }