Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Random Password generation in Enable account JSON

AK_28
New Contributor
New Contributor

We are currently using the below JSON for SAP connector for Enable accounts.

{
"ADDRESS": {
"LASTNAME": "${user.lastname}",
"FIRSTNAME": "${user.firstname}",
"E_MAIL": "${user.email}",
"DEPARTMENT": "${user.customproperty24}",
"ROOM_NO_P": "${user.customproperty9}",
"FUNCTION": "${user.customproperty19}"
},
"LOGONDATA": {
"CLASS": "ACTIVE"
},
"DEFAULTS": {
"KOSTL": "${user.customproperty25}"
},
"PASSWORD": {
"BAPIPWD": "${randomPassword}"
}
}

The Random Password attribute in Create Account JSON is working fine, but in Enable Account JSON it is giving Null as password when passed in email template of enable account email.

4 REPLIES 4

SumathiSomala
All-Star
All-Star

@AK_28 Try

${task.password}

 

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.

rushikeshvartak
All-Star
All-Star

below objects are exposed in enable Account JSON

rushikeshvartak_0-1705290057114.png

{
"ADDRESS": {
"LASTNAME": "${user.lastname}",
"FIRSTNAME": "${user.firstname}",
"E_MAIL": "${user.email}",
"DEPARTMENT": "${user.customproperty24}",
"ROOM_NO_P": "${user.customproperty9}",
"FUNCTION": "${user.customproperty19}"
},
"LOGONDATA": {
"CLASS": "ACTIVE"
},
"DEFAULTS": {
"KOSTL": "${user.customproperty25}"
},
"PASSWORD": {
"BAPIPWD": "${task.password}"
}
}

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

We have put ${task.password} in the enable account json as well as the email template. Password in the enable account task completion email is showing as "null". 

Our goal is to generate a random password on enable account and send it via email just like we are doing it for new account tasks.

Please find the email template below.

SAP account of- ${user.firstname} ${user.lastname}, has been successfully enabled. Kindly find the attached information.

Request id: ${requestid}

PIN: ${user.username}
NIC: ${user.customproperty11}
EPF: ${user.customproperty9}
Email: ${user.email}
First Name: ${user.firstname}
Last Name: ${user.lastname}
Company: ${user.companyname}
Department: ${user.departmentname}
Cost Center: ${user.customproperty25}
NAR: ${requestor.email}

Password: ${task.password}

To get what variables are present to use in the email template, check 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:


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


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.