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

Generate AD password based on initials of first name and last name

Kaustubh
Regular Contributor
Regular Contributor

Hi,

We have a requirement where AD password has to be generated for each account based on condition below:

first letter from First name + first letter from Last name + @ + #3 letters from joining month + Year

To generate password, each alphabet has 4 letter word set like:

a = Able

b = Bird and so on.

Eg. For user Alex Briks joining in August, password should be

AbleBird@Aug2024.

We have no condition of unique password also not going to send it in email. Just need to set default password on the condition.

Please suggest a way to achieve this.


Kaustubh Pawar
Saviynt Certified IGA Professional
32 REPLIES 32

NM
Esteemed Contributor
Esteemed Contributor

Hi @Kaustubh ,

${user.firstname}${user.lastname}${user.startdate.format('MM-yyyy')}


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

rushikeshvartak
All-Star
All-Star

"${user.firstname.toUpperCase().substring(0,1)}${user.lastname.substring(0,1)}${user.startdate.format('MM-yyyy')}"


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

Hi guys,

Let me clear the requirement.

Saviynt will fetch first letter from first name and first letter from last name.

Eg if username is Alex Briks then first letter of each name is A and B.

For A it should take Alfa, for B it should take Bravo and then append it with '@' +joining month + year.

In this case, password generated should be: AlfaBravo@Aug2024

For user Mary Jane, joining date April 2022, password should be MikeJuliett@Apr2022

User Rakesh Somani joining date December 2012, password should be RomeoSierra@Dec2012

a= Alfa, b= Bravo, c= Charlie, d=Delta, e=Echo, f=Foxtrot, g=Golf, h=Hotel, i=India, j=Juliett, k=Kilo, l=Lima, m=Mike, n=November, o=Oscar, p=Papa, q=Quebec, r=Romeo, s=Sierra, t=Tango, u=Uniform, v=Victor, w=Whiskey, x=X-ray, y=Yankee, z=Zulu

This password will be generated for all AD accounts.


Kaustubh Pawar
Saviynt Certified IGA Professional

NM
Esteemed Contributor
Esteemed Contributor

Hi @Kaustubh , you need to apply multiple if else statement.

Fetch first letter if it is A use alex else B use Bravo same for lastname.


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

Use hidden dynamic attribute and generate password


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

I can use query like user.firstname.toString().toLowerCase().substring(0,1) 

to fetch fist letter from first name of the user and likewise build the query.

Where do I put the code? Create Account JOSN of Active Directory?

Also please let me know how I achieve it using dynamic attribute.


Kaustubh Pawar
Saviynt Certified IGA Professional

SELECT CONCAT( CASE LOWER(SUBSTRING(FIRSTNAME, 1, 1)) WHEN 'a' THEN 'Alfa' WHEN 'b' THEN 'Bravo' WHEN 'c' THEN 'Charlie' WHEN 'd' THEN 'Delta' WHEN 'e' THEN 'Echo' WHEN 'f' THEN 'Foxtrot' WHEN 'g' THEN 'Golf' WHEN 'h' THEN 'Hotel' WHEN 'i' THEN 'India' WHEN 'j' THEN 'Juliett' WHEN 'k' THEN 'Kilo' WHEN 'l' THEN 'Lima' WHEN 'm' THEN 'Mike' WHEN 'n' THEN 'November' WHEN 'o' THEN 'Oscar' WHEN 'p' THEN 'Papa' WHEN 'q' THEN 'Quebec' WHEN 'r' THEN 'Romeo' WHEN 's' THEN 'Sierra' WHEN 't' THEN 'Tango' WHEN 'u' THEN 'Uniform' WHEN 'v' THEN 'Victor' WHEN 'w' THEN 'Whiskey' WHEN 'x' THEN 'X-ray' WHEN 'y' THEN 'Yankee' WHEN 'z' THEN 'Zulu' END, CASE LOWER(SUBSTRING(LASTNAME, 1, 1)) WHEN 'a' THEN 'Alfa' WHEN 'b' THEN 'Bravo' WHEN 'c' THEN 'Charlie' WHEN 'd' THEN 'Delta' WHEN 'e' THEN 'Echo' WHEN 'f' THEN 'Foxtrot' WHEN 'g' THEN 'Golf' WHEN 'h' THEN 'Hotel' WHEN 'i' THEN 'India' WHEN 'j' THEN 'Juliett' WHEN 'k' THEN 'Kilo' WHEN 'l' THEN 'Lima' WHEN 'm' THEN 'Mike' WHEN 'n' THEN 'November' WHEN 'o' THEN 'Oscar' WHEN 'p' THEN 'Papa' WHEN 'q' THEN 'Quebec' WHEN 'r' THEN 'Romeo' WHEN 's' THEN 'Sierra' WHEN 't' THEN 'Tango' WHEN 'u' THEN 'Uniform' WHEN 'v' THEN 'Victor' WHEN 'w' THEN 'Whiskey' WHEN 'x' THEN 'X-ray' WHEN 'y' THEN 'Yankee' WHEN 'z' THEN 'Zulu' END, '@', DATE_FORMAT(startdate, '%b'), DATE_FORMAT(startdate, '%Y') ) AS ID FROM USERS where userkey=${requestee}

Use Dynamic attribute in AD JSON ${PWD}

rushikeshvartak_0-1724122750612.png

 


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

NM
Esteemed Contributor
Esteemed Contributor

@Kaustubh hidden dynamic attribute value you won't be able to pass.. try to handle it in create account json only.


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

Bhargavi3
New Contributor III
New Contributor III

Hi Team,

The below code we are trying to generate password but we are getting the error.

"UnicodePwd":"${if(user.firstname.equals('Bhamini'){'alex'}else{'Andy'}'+if(user.lastname.equals('Sanga'){'Bravo'}else{'Ball'}+'@Aug2024}

Error while creating account in AD - Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed: SimpleTemplateScript62619.groovy: 22: expecting ')', found 'else' @ line 22, column 66. name.equals('Bhamini'){'alex'}else{'Andy ^ 1 error

Could someone suggest how to do concat firstname and lastname according to logic.

Thanks,

Bhargavi Padaraju.

{
"UnicodePwd": "${(user.firstname.toLowerCase().charAt(0) == 'a' ? 'Alfa' : user.firstname.toLowerCase().charAt(0) == 'b' ? 'Bravo' : user.firstname.toLowerCase().charAt(0) == 'c' ? 'Charlie' : user.firstname.toLowerCase().charAt(0) == 'd' ? 'Delta' : user.firstname.toLowerCase().charAt(0) == 'e' ? 'Echo' : user.firstname.toLowerCase().charAt(0) == 'f' ? 'Foxtrot' : user.firstname.toLowerCase().charAt(0) == 'g' ? 'Golf' : user.firstname.toLowerCase().charAt(0) == 'h' ? 'Hotel' : user.firstname.toLowerCase().charAt(0) == 'i' ? 'India' : user.firstname.toLowerCase().charAt(0) == 'j' ? 'Juliett' : user.firstname.toLowerCase().charAt(0) == 'k' ? 'Kilo' : user.firstname.toLowerCase().charAt(0) == 'l' ? 'Lima' : user.firstname.toLowerCase().charAt(0) == 'm' ? 'Mike' : user.firstname.toLowerCase().charAt(0) == 'n' ? 'November' : user.firstname.toLowerCase().charAt(0) == 'o' ? 'Oscar' : user.firstname.toLowerCase().charAt(0) == 'p' ? 'Papa' : user.firstname.toLowerCase().charAt(0) == 'q' ? 'Quebec' : user.firstname.toLowerCase().charAt(0) == 'r' ? 'Romeo' : user.firstname.toLowerCase().charAt(0) == 's' ? 'Sierra' : user.firstname.toLowerCase().charAt(0) == 't' ? 'Tango' : user.firstname.toLowerCase().charAt(0) == 'u' ? 'Uniform' : user.firstname.toLowerCase().charAt(0) == 'v' ? 'Victor' : user.firstname.toLowerCase().charAt(0) == 'w' ? 'Whiskey' : user.firstname.toLowerCase().charAt(0) == 'x' ? 'X-ray' : user.firstname.toLowerCase().charAt(0) == 'y' ? 'Yankee' : user.firstname.toLowerCase().charAt(0) == 'z' ? 'Zulu' : '') + (user.lastname.toLowerCase().charAt(0) == 'a' ? 'Alfa' : user.lastname.toLowerCase().charAt(0) == 'b' ? 'Bravo' : user.lastname.toLowerCase().charAt(0) == 'c' ? 'Charlie' : user.lastname.toLowerCase().charAt(0) == 'd' ? 'Delta' : user.lastname.toLowerCase().charAt(0) == 'e' ? 'Echo' : user.lastname.toLowerCase().charAt(0) == 'f' ? 'Foxtrot' : user.lastname.toLowerCase().charAt(0) == 'g' ? 'Golf' : user.lastname.toLowerCase().charAt(0) == 'h' ? 'Hotel' : user.lastname.toLowerCase().charAt(0) == 'i' ? 'India' : user.lastname.toLowerCase().charAt(0) == 'j' ? 'Juliett' : user.lastname.toLowerCase().charAt(0) == 'k' ? 'Kilo' : user.lastname.toLowerCase().charAt(0) == 'l' ? 'Lima' : user.lastname.toLowerCase().charAt(0) == 'm' ? 'Mike' : user.lastname.toLowerCase().charAt(0) == 'n' ? 'November' : user.lastname.toLowerCase().charAt(0) == 'o' ? 'Oscar' : user.lastname.toLowerCase().charAt(0) == 'p' ? 'Papa' : user.lastname.toLowerCase().charAt(0) == 'q' ? 'Quebec' : user.lastname.toLowerCase().charAt(0) == 'r' ? 'Romeo' : user.lastname.toLowerCase().charAt(0) == 's' ? 'Sierra' : user.lastname.toLowerCase().charAt(0) == 't' ? 'Tango' : user.lastname.toLowerCase().charAt(0) == 'u' ? 'Uniform' : user.lastname.toLowerCase().charAt(0) == 'v' ? 'Victor' : user.lastname.toLowerCase().charAt(0) == 'w' ? 'Whiskey' : user.lastname.toLowerCase().charAt(0) == 'x' ? 'X-ray' : user.lastname.toLowerCase().charAt(0) == 'y' ? 'Yankee' : user.lastname.toLowerCase().charAt(0) == 'z' ? 'Zulu' : '') + '@Aug2024'}"
}


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

NM
Esteemed Contributor
Esteemed Contributor

Try this

@Bhargavi3 

"UnicodePwd":"${if(user.firstname.equals('Bhamini')){'alex'}else{'Andy'}} ${if(user.lastname.equals('Sanga')){'Bravo'}else{'Ball'}}@Aug2024


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

Bhargavi3
New Contributor III
New Contributor III

Hi @NM ,

Tried, but did not work.

"UnicodePwd":"${if(user.firstname.equals('Bhamini')){'alex'}else{'Andy'}}${if(user.lastname.equals('Sanga')){'Bravo'}else{'Ball'}}@Aug2024"

Error logs:

Error while creating account in AD - [LDAP: error code 21 - 00000057: LdapErr: DSID-0C0911BC, comment: Error in attribute conversion operation, data 0, v3839]

Thanks,

Bhargavi Padaraju.

NM
Esteemed Contributor
Esteemed Contributor

@Bhargavi3 , share error logs in txt format.

try once with this only- ${if(user.firstname.equals('Bhamini')){'alex'}else{'Andy'}}


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

Bhargavi3
New Contributor III
New Contributor III

Hi @NM ,

tried with this also, but did not work.

Got the below error:
Error while creating account in AD - [LDAP: error code 53 - 0000052D: SvcErr: DSID-031A126A, problem 5003 (WILL_NOT_PERFORM), data 0 ]

Thanks,

Bhargavi Padaraju.

Did you tried code i have shared


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

NM
Esteemed Contributor
Esteemed Contributor

Complete logs in text file? @Bhargavi3 


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

Bhargavi3
New Contributor III
New Contributor III

Hi @rushikeshvartak,

Yes I tried, but did not work.

getting below error.

Bhargavi3_0-1724136447135.png

Thanks,

Bhargavi Padaraju.

Bhargavi3
New Contributor III
New Contributor III

Hi Team,

Please find the attached logs.

Thanks,
Bhargavi Padaraju.

[This message has been edited by moderator to mask sensitive information]

"2024-08-20T07:21:01.496+00:00","ecm-worker","ldap.SaviyntGroovyLdapService","quartzScheduler_Worker-6-ldgr6","ERROR","Error while creating account in AD - [LDAP: error code 21 - 00000057: LdapErr: DSID-0C0911BC, comment: Error in attribute conversion operation, data 0, v3839 ]"
"2024-08-20T07:21:02.287+00:00","ecm-worker","","null-ldgr6","","javax.naming.directory.InvalidAttributeValueException: [LDAP: error code 21 - 00000057: LdapErr: DSID-0C0911BC, comment: Error in attribute conversion operation, data 0, v3839 ]; remaining name 'CN=Bhamini Sanga,OU=SaviyntTest,DC=XXXX,DC=COM' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3274) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3207) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2998) at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:840) at

 

Use part of logic don't use full and validate

"UnicodePwd": "${user.firstname.toLowerCase().substring(0, 1) == 'b' ? 'Bravo' : ''}${user.lastname.toLowerCase().substring(0, 1) == 'b' ? 'Bravo' : ''}@Aug2024"


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

Hi @rushikeshvartak ,

tried with the below code but did not work. please find the attached logs and suggest any way to acheive this.

"UnicodePwd": "${user.firstname.toLowerCase().substring(0, 1) == 'b' ? 'Bravo' : ''}${user.lastname.toLowerCase().substring(0, 1) == 'b' ? 'Bravo' : ''}@Aug2024"

Create Account Json:

{
"accountExpires":"0",
"co":"${user.country}",
"department":"${user.departmentname}",
"employeetype":"${user.employeeType}",
"givenName":"${user.firstname}",
"l":"${user.city}",
"mail":"${user.email}",
"name":"${user.firstname + '' + user.lastname}",
"objectClass":[
"top",
"person",
"organizationalPerson",
"user"
],
"pwdLastSet":"0", "SAMAccountName":"${user.email.substring(0,user.email.indexOf('@'))}",
"sn":"${user.lastname}",
"st":"${user.state}",
"manager": "${ if (managerAccount == null || managerAccount?.accountID == null || managerAccount?.accountID == '' ){''} else {managerAccount?.accountID} }", "streetAddress":"${user.street}",
"title":"${user.title}",
"userPrincipalName":"${user.email}",
"UnicodePwd": "${user.firstname.toLowerCase().substring(0, 1) == 'b' ? 'Bravo' : ''}${user.lastname.toLowerCase().substring(0, 1) == 'b' ? 'Bravo' : ''}@Aug2024"
}

Thanks,

Bhargavi Padaraju.

{
  "accountExpires":"0",
  "co":"${user.country}",
  "department":"${user.departmentname}",
  "employeetype":"${user.employeeType}",
  "givenName":"${user.firstname}",
  "l":"${user.city}",
  "mail":"${user.email}",
  "name":"${user.firstname} ${user.lastname}",
  "objectClass":[
    "top",
    "person",
    "organizationalPerson",
    "user"
  ],
  "pwdLastSet":"0",
  "SAMAccountName":"${user.email.substring(0,user.email.indexOf('@'))}",
  "sn":"${user.lastname}",
  "st":"${user.state}",
  "manager": "${ if (managerAccount == null || managerAccount?.accountID == null || managerAccount?.accountID == '' ){''} else {managerAccount?.accountID} }",
  "streetAddress":"${user.street}",
  "title":"${user.title}",
  "userPrincipalName":"${user.email}",
  "UnicodePwd": "\"${user.firstname.toLowerCase().substring(0, 1) == 'b' ? 'Bravo' : ''}${user.lastname.toLowerCase().substring(0, 1) == 'b' ? 'Bravo' : ''}@Aug2024\""
}

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

Bhargavi3
New Contributor III
New Contributor III

Hi @rushikeshvartak

did not work,same error we are getting.

Bhargavi3_0-1724213753775.png

 

Thanks,

Bhargavi Padaraju.

Verify Attribute Values

Check all values being used in your JSON:

  • Length: Ensure that values like name, givenName, sn, etc., do not exceed the maximum allowed length in AD.
  • Special Characters: Remove or escape any special characters in name, sn, or UnicodePwd attributes.
  • CN (Common Name): The name attribute is used to construct the CN. Ensure it does not include any invalid characters or exceed length limits.

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

Thank you everyone for the response.

Working query:

"UnicodePwd": "${ (user.firstname.toLowerCase().substring(0, 1) == 'a' ? 'Alfa' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'b' ? 'Bravo' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'c' ? 'Charlie' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'd' ? 'Delta' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'e' ? 'Echo' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'f' ? 'Foxtrot' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'g' ? 'Golf' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'h' ? 'Hotel' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'i' ? 'India' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'j' ? 'Juliett' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'k' ? 'Kilo' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'l' ? 'Lima' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'm' ? 'Mike' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'n' ? 'November' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'o' ? 'Oscar' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'p' ? 'Papa' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'q' ? 'Quebec' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'r' ? 'Romeo' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 's' ? 'Sierra' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 't' ? 'Tango' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'u' ? 'Uniform' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'v' ? 'Victor' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'w' ? 'Whiskey' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'x' ? 'X-ray' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'y' ? 'Yankee' : '') }${ (user.firstname.toLowerCase().substring(0, 1) == 'z' ? 'Zulu' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'a' ? 'Alfa' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'b' ? 'Bravo' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'c' ? 'Charlie' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'd' ? 'Delta' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'e' ? 'Echo' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'f' ? 'Foxtrot' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'g' ? 'Golf' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'h' ? 'Hotel' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'i' ? 'India' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'j' ? 'Juliett' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'k' ? 'Kilo' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'l' ? 'Lima' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'm' ? 'Mike' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'n' ? 'November' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'o' ? 'Oscar' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'p' ? 'Papa' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'q' ? 'Quebec' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'r' ? 'Romeo' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 's' ? 'Sierra' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 't' ? 'Tango' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'u' ? 'Uniform' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'v' ? 'Victor' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'w' ? 'Whiskey' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'x' ? 'X-ray' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'y' ? 'Yankee' : '') }${ (user.lastname.toLowerCase().substring(0, 1) == 'z' ? 'Zulu' : '') }@Aug2024"


Kaustubh Pawar
Saviynt Certified IGA Professional

Bhargavi3
New Contributor III
New Contributor III

 Hi @rushikeshvartak @NM ,

We are able to generate a password by using the above logic in active directory, but when client is trying to login into AD, they are getting error. 

Errror we are getting is : Your Email or password is incorrect.If you dont remember your password reset it now.

Could someone help us how we can resolve this issue?

Thanks,

Bhargavi

NM
Esteemed Contributor
Esteemed Contributor

Hi @Bhargavi3 , hope you have applied the same logic in password email template Otherwise it won't work.


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

Bhargavi3
New Contributor III
New Contributor III

Actually No.

Our requirement is like with the above password which we specified in CreateAccjson IT team will login and perform some configurations. For enduser, we craeted one password policy and we are generating random password where end user will login into Active Directory.

Thanks,

Bhargavi Padaraju.

 

NM
Esteemed Contributor
Esteemed Contributor

@Bhargavi3 , if you are setting the password in the basis of your logic but sending a random password they won't be able to login you have to send the same one.


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

What is variable used in email ?


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

There are two cases:

1. We are creating account, and password is generated from logic above.

eg. Rushi Vartak with startdate in September 2024, password will be RomeoVictor@Sep2024.

And we are not sharing this password over email. 
However, for change password, we are using ${task?.password} in email

 

2. I tried to hard code the value in RESETANDCHANGEPASSWRDJSON as "UnicodePwd": "VictorDelta@Aug2024" but still the password was generated randomly, and was shared in email and end user can login with that random password.


Kaustubh Pawar
Saviynt Certified IGA Professional

This thread is going long please create new thread for this issue. In new thread please use below code and share output

Please validate supported variables.

Purpose :

To get what variables are present to use in the email template.

Email Template steps :

keep Advanced HTML CSS flag is checked

Keep your email Address in TO

TO /CC/BCC & Subject - Don't use any dynamic variables

Add only below code in Email Body
${this.binding.variables.each {RVkey,RVvalue -> println "$RVkey ------- $RVvalue" + "" + "br" + ">"}}

Output : using the below expression. By putting it in the email body, it will print all variable names with values, and then accordingly, you can use it:


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

Dave
Community Manager
Community Manager

Thread Closed - Solution Accepted!

This thread has been closed as the original issue has been successfully resolved.

To maintain a clean and organized forum, we ask that any new issues or questions be posted in a new thread. This helps keep discussions focused and makes it easier for others to search and find relevant solutions.

Thank you for your understanding and cooperation!