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
1 answer

Hello, I have a question regarding the suffix, how can I get the same dropdown "after user creation" in the edit section like at user creation, because the domain ... be changed: During creation I have all my suffixes available: But not after creation: Thanks

asked 5 days ago by boris (550 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)
3,588 questions
3,277 answers
8,303 comments
548,090 users