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 (216k 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)   
} 
0

Thanks, it works!

Related questions

0 votes
1 answer

Hi , I have fully working After Create User Business Rule Question 1 ) It does create and send everyting throu eMail except sending user exchange eMail. How can i do ... want help desk to check Generate password checkbox. I want to generate in business rule.

asked Nov 29 by vagifazari (450 points)
0 votes
1 answer

I'm trying to modify mailbox settings to add additional email addresses to a user after creation. This is a hybrid on-prem and Exchange Online with E5 licenses. Everything works up ... to a different OU during the process so I know the user exists. Any ideas?

asked Mar 6, 2023 by Michael Long (70 points)
0 votes
1 answer

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

asked Nov 30, 2022 by Jeff.Briand (80 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)
3,572 questions
3,261 answers
8,277 comments
547,996 users