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

SAV File - Not Create Users

sab2
Regular Contributor
Regular Contributor

Hi,

We are working to create a solution where we have a SAV file and a users cvs feed file. However, we want the csv feed file to only be used for updates. Not to be used to create users. Users would only be created through the Saviynt UI form. 

In the SAV file is it possible to set a configuration that if the user does not exist in Saviynt, do nothing. For example we are using the employeeid for the reconciliation field. Can we set if employeeid is not found do nothing? That way no user is created from the feed file. Or is there a global configuration to achieve this?

Thank you!

6 REPLIES 6

ParitaSavla
Saviynt Employee
Saviynt Employee

This is not supported at the moment to just use the schema and csv file to update users. It will create a user in case the user does not exist.

amit_krishnajit
Saviynt Employee
Saviynt Employee

@sab2 - did you try to achieve this using ModifyUserDataJSON or pre-preprocessor?

Using the ModifyUserDataJSON, you may want to delete all the records from NEWUSERDATA table which do not have a corresponding record in the CURRENTUSERS table. This way you may avoid importing data for any users which do not exist in the system already. 

 

Thanks,
Amit

sab2
Regular Contributor
Regular Contributor

Hi Amit, is there a sample query we could test out in the modifyuserdatajson or preprocessor which would delete the records from NEWUSERDATA? Or a link to a FD / forums article where this is previously done? I had tried to search around but did not find anything similar to use as a reference. 

Thank you.

The query would look something like the following - 

DELETE n1 FROM NEWUSERDATA n1 WHERE n1.username NOT IN (SELECT DISTINCT n2.username FROM CURRENTUSERS n2);

 

Thanks,
Amit

rushikeshvartak
All-Star
All-Star

can you share current sav file config


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

sab2
Regular Contributor
Regular Contributor

Hi,

This is a shortened version of our SAV file:

SAV:

#USER_NOT_IN_FILE_ACTION=NOACTION
#FILENAME=name123
#DELIMITER=,
#SKIP_NUMBER_OF_LINES=1
#IGNOREFIRSTLINE=TRUE
#ZERODAYPROVISIONING=TRUE
#userReconcillationField=EMPLOYEEID
#GENERATESYSTEMUSERNAME=TRUE
#GENERATEEMAIL=FALSE
#EMAILTEMPLATE="Email Template Name"
#CHECKRULES=TRUE
#STATUSKEYJSON= { "STATUS_ACTIVE": ["Active"], "STATUS_INACTIVE": [ "inactive"] }
#MODIFYUSERDATAJSON={"ADDITIONALTABLES": {"USERS": "SELECT lastname,systemUserName,firstname, username, CUSTOMPROPERTY31, secondaryManager, MANAGER, LOCATION, PREFEREDFIRSTNAME,employeeid FROM USERS"},"COMPUTEDCOLUMNS": ["firstname","username","secondaryManager", "MANAGER","employeeid"],"PREPROCESSQUERIES": ["UPDATE NEWUSERDATA N JOIN CURRENTUSERS U ON N.EMPLOYEEID=U.EMPLOYEEID SET N.USERNAME=U.USERNAME","UPDATE NEWUSERDATA LEFT JOIN CURRENTUSERS ON NEWUSERDATA.EMPLOYEEID = CURRENTUSERS.EMPLOYEEID SET NEWUSERDATA.MANAGER = case when CURRENTUSERS.MANAGER is not null then CURRENTUSERS.MANAGER WHEN (CURRENTUSERS.MANAGER IS NULL or CURRENTUSERS.MANAGER = '') THEN NEWUSERDATA.SECONDARYMANAGER end","UPDATE NEWUSERDATA LEFT JOIN CURRENTUSERS ON NEWUSERDATA.EMPLOYEEID = CURRENTUSERS.EMPLOYEEID SET NEWUSERDATA.FIRSTNAME = case when CURRENTUSERS.FIRSTNAME is not null and CURRENTUSERS.FIRSTNAME != '' then CURRENTUSERS.FIRSTNAME WHEN (CURRENTUSERS.FIRSTNAME IS NULL or CURRENTUSERS.FIRSTNAME = '') THEN NEWUSERDATA.FIRSTNAME end"]}
EMPLOYEEID,LASTNAME,FIRSTNAME,MIDDLENAME,CustomProperty29,CustomProperty30,CustomProperty9,CustomProperty8,CustomProperty38,SECONDARYMANAGER,CustomProperty3