We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Need to generate random PIN in database connector and save it in encrypted text at Saviynt portal

SeemaDas
New Contributor II
New Contributor II

Hello

We have a requirement to generate 4 digit random PIN for user on database and save the PIN in encrypted text in Saviynt end The same PIN need to send to user via mail. 

Following is the format of create and import account query

{

"createaccountqry":

"INSERT INTO TABLE (EMPLOYEE_PIN) VALUES(SUBSTRING(FLOOR((RAND() * 9999) + 100000),3,4))"

}

The random number is not getting generated.

import query

SELECT ENCRYPT_AES(EMPLOYEE_PIN) FROM TABLE 

not working 

Any help is appreciated.

 

2 REPLIES 2

armaanzahir
Valued Contributor
Valued Contributor

Hi @SeemaDas 

How have you configured the accountimportxml? 

You could utilize the ecp's which Saviynt provides in the users table.

armaanzahir_0-1700661408495.png

Database Schema Reference (saviyntcloud.com)

You could map the pin attribute on the target to ecp1 of saviynt in your importxml.

You could then utilize these variables in emails to send the pin to the user.

Below is a forum post that guides you on that.

using ecp in email templates - Saviynt Forums - 48782

 

 

Regards,
Md Armaan Zahir

ECP field not available in users table to use. I enabled global config for ecp and then tried to import PIN attribute in {users.ecp1}, but it is not working