Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Rehire Use case for Active Directory Password is not sent in notification

GeSaviynt
New Contributor II
New Contributor II

Hi Team,

Json for Enable Account:

{
"USEDNFROMACCOUNT": "YES",
"MOVEDN": "YES",
"REMOVEGROUPS": "No",
"ENABLEACCOUNTOU": "${if(user.employeeType != 'df'){'OU=People,DC=ABC,DC=XYZ,DC=COM'} else {'OU=External,DC=ABC,DC=XYZ,DC=COM'}}",
"AFTERMOVEACTIONS": {
"userAccountControl": "512",
"userPassword": "${org.apache.commons.lang.RandomStringUtils.randomAlphanumeric(7)+'!@#$%^&*'.charAt((new Random().nextInt('!@#$%^&*'.length())))}",
"pwdLastSet": "0",
"description": "Rehired by Saviynt on ${user?.updatedate}"
}
}

I can see password is generated in log. But email is not getting triggered ,it 'seems there is issue for password attribute.

Email Template :

<div>*** This is an automated message ***</div><div>You are receiving this email because an Active Directory account has been created for ${user?.firstname} ${user?.lastname}(<% if(user?.employeeid !=null) print "${user?.employeeid}" else print "" %>).</div><div><br></div><div>The password for this account is : <% if(task?.password !=null) print "${task?.password}" else print "" %></div><div><% if(user?.employeeType.equalsIgnoreCase('AB')){%></div><div><br></div><div>The account information, including the Active Directory (AD) ID, will be communicated in a separate email.</div><div><%}else{%></div><div>The user's other account information, including user ID, will be communicated in a separate email.</div><div><br></div><div>As ${user?.firstname} ${user?.lastname}'s manager, we ask that you please provide this information to the user in a secure manner so the user may access the account.<%}%></div><div><br></div><div>

At the end point of Active Directory , configured this notification on 'Enable' Account.

Can you please share your inputs on this.

Thanks

Geeta

 

 

 

 

 

 

5 REPLIES 5

avinashchhetri
Saviynt Employee
Saviynt Employee

Hello @GeSaviynt,

You could try the following variables for password : randompassword/account_password.

Alternately, you could add the following in the email templates and see what variables are exposed and use accordingly.

${this.binding.variables.each {k,v -> println "$k = $v" + "<" + "br" + ">"}}

 

 

Regards,
Avinash Chhetri

Hi,

Okay will try this. I used this attribute in Enable Account json 'userPassword' and in email template '${task?.password}' so instead of 'userPassword' have to used randompassword/account_password?

Thanks

Geeta

Use below code in email. Body for testing purpose to know which variables are exposed in enable account template & share screenshot

${this.binding.variables.each {k,v -> println "$k = $v" + "<" + "br" + ">"}}


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

rushikeshvartak
All-Star
All-Star
  • What is task type created under pending tasks?
  • Does log shows email template ? 
  • Did you ran email History job? 

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

@rushikeshvartak 

1. Yes Enable task is created and completed also.

2. In log I can se email template name , from and to value replaced and there is no error.

3. Yes, I ran the job.