0 votes

Hello Everyone,
I've been using the product for the past handful of months and it has completely changed self service and administration here at my company. I can't thank you enough for such a solid product.

I have one small nitpick on the "Password Reset Notification" field under the password self service policy settings.

Is there a way that I can have two separate emails based on the action of the end user? At the current time only one email notification goes out no matter if they reset their password or unlocked their account through the ./selfservice portal.

Can this notification be separated into two direct emails based on what their action was?

by (360 points)

Just wondering if this can be added as a future change

1 Answer

0 votes
by (215k points)
selected by
Best answer


Actually, it can be done even without any changes to Adaxes. You can configure a Business Rule triggered after self-resetting password that will send e-mail notifications depending on the type of the operation.

Since a script will be required to distinguish between the operation types, we suggest sending mails also with the help of a script. Below, you can find an example of such a script that uses the $Context.SendMail method to send the e-mails. To get more information on how to use it, see section Sending Emails and SMS in the following article from our SDK: http://www.adaxes.com/sdk/?ServerSideSc ... ailsAndSms. To send mails to the user who reset their password and/or unlocked their account, pass %mail% as the 1st parameter of the method. This is a value reference that will be replaced with the Email property of the user whose password is reset / account is unlocked when the script runs.

To create such a Business Rule:

  1. Create a new Business Rule.

  2. On step 2 of the Create Business Rule wizard, select User and After Self-resetting password.

  3. On step 3, add the Run a program or PowerShell script action.

  4. In the Script field, paste the following script. Modify the parameters of the SendMail method to match your requirements for each of the situations.

     $operationName = $Context.Action.GetOperationName($NULL, $Context.TargetObject, "ADM_ACTIONNAMEFORMAT_SPECIFIC, ADM_ACTIONNAMEFORMAT_CAPITALLETTER")
     if ($operationName.EndsWith("reset password, unlock account"))
         # The user has reset a password and unlocked account
         $Context.SendMail("%mail%", "Your account has been unlocked and password reset", "<BODY-TEXT>", "<BODY-HTML>") # TODO: modify me
     elseif ($operationName.EndsWith("reset password"))
         # The user has reset a password only
         $Context.SendMail("%mail%", "Your password has been reset", "<BODY-TEXT>", "<BODY-HTML>") # TODO: modify me
     elseif ($operationName.EndsWith("unlock account"))
         # The user has unlocked account only
         $Context.SendMail("%mail%", "Your account has been unlocked", "<BODY-TEXT>", "<BODY-HTML>") # TODO: modify me
  5. Enter a short description for the script and click OK.

  6. Finish creation of the Business Rule.

After configuring such a Business Rule, you can disable sending e-mail notifications in your Password Self-Service Policy settings as default emails will no longer be needed.

Related questions

0 votes
1 answer

Hi there, We're preparing for the release of a Password Self-Service portal with Adaxes, essentially a scaled-down version of the selfservice portal with a customized ... the properties/conditions used to determine "person is not enrolled"? Thanks in advance!

asked Dec 30, 2011 by Kirk (60 points)
0 votes
1 answer

Is there a way to allow users to either answer the self-service reset questions OR get an SMS/Email verification? I can see how to set a policy for either one, but is there any way to enable an end user to choose which to use?

asked Apr 4, 2016 by johnsonua (390 points)
0 votes
1 answer

We don't have access to an SMS gateway, so we wanted to enable email verification for self-service password resets. Unfortunately the interface only appears to allow the ... to make the user enter such a 'rescue' email address during self-service enrollment?

asked Apr 1, 2016 by johnsonua (390 points)
0 votes
1 answer

Hello Forum, is it possible to change the Password Self Service to enter the email adress instead of entering the username? Thanks a lot for your help. Cheers

asked Feb 8, 2016 by esoAdxAdmin (650 points)
0 votes
1 answer

Hello, Similarly to how you can have a mobile number field on the Password Self Service enrollment page, is there any way you can have an alternate field such as ... a custom attribute after enrollment through regular self service. Possible or no? Thank you.

asked Nov 27, 2017 by Kevin (100 points)
2,801 questions
2,535 answers
61,659 users