Password Reset Link for a new User

Hi - Has anyone worked on generating a password reset link similar to the one created by the suspend node.

For the new users bulk loaded, the requirement is to sent out a password reset link with the embedded email, so that the users don’t have to re-enter the email address and then click on the next link to set their password.

Any one worked on this or similar requirements, please provide inputs.

Thanks -Mat

hi @mdaveiam,
I think you should add a script in the OnCreate definition of User Object (it can be done from the Event hook menu or in the native IDM interface).

Use a script similar to this one below:

var params = new Object();
params.templateName = "resetPassword";
params.to = object.mail;
params.object = { 
   "userName": object.userName, 
   "telephoneNumber": object.telephoneNumber
};
if (params.object.email !== null) {
   openidm.action("external/email", "sendTemplate", params);
}

and the in Email Template should contain a link to you password reset journey.
Regards,
Steph.

1 Like

Hi Stephane,

Thanks for the reply. In fact, I want to sent an one time link to the end-user, instead of the two step process of user entering the email and then getting the link from the suspend node.

I was able to design that flow with the Zeropage login node using a service account and then pass the end user email as a query parameter. This is tested as working using the browser.

The browser solution works only for a single user basis. However, I need to dynamically send this link (the suspend link) to > 5k users.

So, I am looking for an API based invocation to the custom Journey. I tried using the scripted node, but it doesn’t seem to work.

Has anyone worked with REST API approach to an Journey execution ( by dynamically setting the attributes to the nodes). This will enable in my case to trigger single link to the reset password page.

Any one with suggestion, would be of great help.

thanks -Mat

Yes this is possible, via the /authenticate endpoint, and working with callbacks. The tree would just need to retrieve the mail parameter from the request. However, please be aware that AM is not an API/application server, nor a bulk campaign service. I would encourage you to consider the same functionality implemented with IDM (as Stephane hinted) while users are onboarded (onCreate), or using a schedule task afterwards - this would yield far better performances.

Regards
Patrick

1 Like

Thanks Patrick, I got a reference and tried using postman and it worked. Agree with you bulk campaign /API server. In our requirement, we have to bulk load good number of users and request password reset and that is why trying to find a simpler solution instead of putting user action load on less tech focused end-users.

This is planned to work with a schedule task. Appreciate your inputs.

https://backstage.forgerock.com/docs/idcloud/latest/am-authentication/login-using-rest.html

1 Like