0 votes

Can I configure Adaxes service to send emails to HR staff after user creation and/or password change? I need this email to
contain User Full Name (%username%) and password (is there a reference for this?)

by (180 points)

1 Answer

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

User passwords are stored in the unicodePwd property. Due to security reasons, Active Directory doesn't allow reading this property (that's why value reference %unicodePwd% will always be replaced with an empty string).

There are two ways on how you can solve this problem.

Method 1: Temporarily store user passwords in an intermediate property, use a value reference to this property in the notification text, and then clear this property.
1. Choose any unused property of AD user objects (e.g. Notes). Configure Property Patterns to generate a value for this property using template %unicodePwd%.
2. In the e-mail notification text use value reference to this property (e.g. Password: %info%).
3. Configure the Business Rule to clear the value of the property right after e-mail notification is sent. (Add Update the User action, click Add, select the Notes property, and click Remove property)

Method 2: Send e-mail notifications using a script.
1. Add 'Run a program or PowerShell script' action to your Business Rule.
2. Select PowerShell script in the Type combo box.
3. Use the following script to send e-mail notifications:

$emailTo = "to@company.com";
$emailFrom = "noreplay@company.com"
$subject = "Subject"
$body = "User Full Name: %username%
UserID: %uid%
TempPWD: {0}."
$smtpServer = "smtp.company.com"

if ($Context.IsPasswordChanged())
    $newPassword = $Context.GetNewPassword();
    $body = [System.String]::Format($body, $newPassword)
    $smtp = new-object Net.Mail.SmtpClient($smtpServer)
    $smtp.Send($emailFrom, $emailTo, $subject, $body)   

Thanks, it works!

Related questions

0 votes
1 answer

User received email from Lumifi and wanted to verify if legit or if this is not from Adaxes?

asked 5 days ago by Jeff.Briand (20 points)
0 votes
0 answers

Hello, I am trying to get adaxes to send out 2 seperate emails to the new users manager with the account username in one and the password in the other. I thought ... is complete on the user we are testing with. Am I missing something basic here? Regards

asked Apr 16, 2019 by wayne (70 points)
0 votes
1 answer

This happens very rarely, but occasionally when a user changes there password from the self service site they will be logged out from the site. This is confusing to our ... need to change to stop this from happening? Any advice is appreciated, thanks! Spencer

asked Dec 18, 2017 by spencerp (120 points)
0 votes
0 answers

When attempting to assign licenses during the "after creating a user" rule we're reciving the following error. Failed to create a remote mailbox for the user. The address ' ... mail attribute to the proper format that isn't the onmicrosoft.com domain as well.

asked Sep 2, 2021 by zorps (20 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)
2,880 questions
2,600 answers
117,179 users