Upon successful AD account creation, AD post prov rule sends password via email.
if the password has $!, the chars before $! only are sent via email, everything else is getting stripped off when the user receives email,
For example, if generated password is ‘ABC$!kng8YVJv4nw‘, user is getting password as ABC . It appears that $! is causing the issue. Tested with standalone rule and i was able to reproduce the issue.
I can remove $ from the symbols list to make sure that this doesn’t happen again.
If anyone did come across this issue, what did you do to address this issue ?
This string is expanded and added to the end of the Joiner Temporary Password Notification email sent to inform the manager of the initial, temporary password set for new accounts. If we want we can customize based on our requirement.
In Velocity, anything that follows a $ symbol is treated as a variable. If the variable has no value, Velocity prints the name as-is (for example, $variableName). To suppress this behavior, you can use the quiet reference syntax $!variableName, which hides the output when the variable is undefined.
Since your generated password contains the sequence $! velocity interprets this as a quiet reference, assuming the characters after ! are the variable name. Since no variable like kng8YVJv4nw exists in the context, velocity replaces it with an empty string, effectively stripping the rest of the password.
As you said, better remove the $ from the password or try to escape with \ or \\.
Hi @Ramthetrib0 , You can use the code below to send an email to the user. You need to set the generated password in the emailOptions object: “emailOptions.setVariable(“password”, “ABC$!kng8YVJv4nw”); "If you use a variable, you do not need to escape the characters; it will work with any character. Try the code snippet below.