Inactive user if not in the source

PragyaPurwar
New Contributor II
New Contributor II

I have to make the user inactive if it is not in the source . My connection is DB .

I am using <userNotInFileAction>Inactive</userNotInFileAction>. Job type is Users Import (Complete) from Database (UserImportFullJob)  It is not making it inactive .

PragyaPurwar_0-1693812263249.png

[This post has been edited by moderator to disable hyperlink to a URL]

7 REPLIES 7

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @PragyaPurwar 

Could you kindly provide the complete query? Additionally, I'm interested in understanding how you are importing the users and which connector you are using.

Thank you!

PragyaPurwar
New Contributor II
New Contributor II

I am using DB connector as I mentioned above . In userimport giving this query 

<dataMapping>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="username">
<![CDATA[SELECT STAFF_NUMBER as username,FIRST_NAME as firstname,LAST_NAME as lastname,MIDDLE_NAME as middlename,PRIMARY_MANAGER as manager,
PRIMARY_WORK_PHONE as phonenumber, PREFERRED_SURNAME as surname,ADDRESS_SUBURB as city,ADDRESS_POSTCODE as regioncode,
PREFERRED_FIRST as preferedFirstName,MAX_OCCUP_TERM_DATE as termdate,MIN_COMMENCE_DATE as startdate,PERSONAL_EMAIL as secondaryEmail,
PRIMARY_BU as departmentNumber,PRIMARY_BU_DESC as departmentname,PRIMARY_CLEVEL7_DESC as orgunitid,PRIMARY_CLEVEL8 as employeeclass,
PRIMARY_FACULTY_DESC as companyname,PRIMARY_MBDP as location,PRIMARY_MBDP_DESC as locationdesc,PRIMARY_PERSON_TYPE as employeeType,
PRIMARY_ROLE_DESC as jobDescription,WORK_MOBILE_PHONE as secondaryPhone,TITLE as title,STAFF_NUMBER as employeeid,STAFF_NUMBER as systemUsername,
ALL_EMP_JOB_BUS as AllEmpJobBus,NAME_SEARCH_PERMIT as NameSearchPermit,PRIMARY_MANAGER_POSITION# as PrimaryManagerPosition,
ALL_EMP_AWARDS as AllEmpAwards,
ALL_EMP_CLEVEL8 as AllEmpClevel8,
ALL_EMP_CLEVELS as AllEmpClevels,
ALL_EMP_JOB_BUS as AllEmpJobBus,
ALL_EMP_STATUS as AllEmpStatus,
DATE_OF_BIRTH as DOB,
PRIMARY_START_REASON as PrimaryStartReason,
PRIMARY_START_REASON_DESC as PrimaryStartReasonDesc,
ALL_START_REASON as AllStartReason,
(CASE WHEN PREFERRED_FIRST IS NOT NULL AND PREFERRED_SURNAME IS NOT NULL THEN (PREFERRED_FIRST||' '||PREFERRED_SURNAME)
WHEN PREFERRED_FIRST IS NULL AND PREFERRED_SURNAME IS NOT NULL THEN (FIRST_NAME||' '||PREFERRED_SURNAME)
WHEN PREFERRED_FIRST IS NOT NULL AND PREFERRED_SURNAME IS NULL THEN (PREFERRED_FIRST||' '||LAST_NAME)
ELSE (FIRST_NAME||' '||LAST_NAME) END) as displayname,
(STAFF_NUMBER ||'@'||'uwa.edu.au') as email,
(CASE WHEN MIN_COMMENCE_DATE >= CURRENT_DATE THEN '0' ELSE '1' END) as status,PRIMARY_MANAGER_TITLE as PrimaryManagerTitle,
PRIMARY_POSITION# as jobCode ,PRIMARY_STATUS as PrimaryStatus FROM concept.UWA_SAVIYNT_STAFF_VW where MIN_COMMENCE_DATE <= CURRENT_DATE+1]]>
</sql-query>
<importsettings>
<zeroDayProvisioning>false</zeroDayProvisioning>
<generateEmail>true</generateEmail>
<userNotInFileAction>inactive</userNotInFileAction>
<checkRules>false</checkRules>
<buildUserMap>false</buildUserMap>
<generateSystemUsername>false</generateSystemUsername>
<userReconcillationField>username</userReconcillationField>
</importsettings>
<mapper description="This is the mapping field for Saviynt Field name">
<mapfield saviyntproperty="username" sourceproperty="username" type="character"></mapfield>
<mapfield saviyntproperty="firstname" sourceproperty="firstname" type="character"></mapfield>
<mapfield saviyntproperty="lastname" sourceproperty="lastname" type="character"></mapfield>
<mapfield saviyntproperty="statuskey" sourceproperty="status" type="character"></mapfield>
<mapfield saviyntproperty="middlename" sourceproperty="middlename" type="character"></mapfield>
<mapfield saviyntproperty="manager" sourceproperty="manager" type="character"></mapfield>
<mapfield saviyntproperty="phonenumber" sourceproperty="phonenumber" type="character"></mapfield>
<mapfield saviyntproperty="customproperty1" sourceproperty="surname" type="character"></mapfield>
<mapfield saviyntproperty="city" sourceproperty="city" type="character"></mapfield>
<mapfield saviyntproperty="regioncode" sourceproperty="regioncode" type="character"></mapfield>
<mapfield saviyntproperty="preferedFirstName" sourceproperty="preferedFirstName" type="character"></mapfield>
<mapfield saviyntproperty="termdate" sourceproperty="termdate" type="character"></mapfield>
<mapfield saviyntproperty="startdate" sourceproperty="startdate" type="character"></mapfield>
<mapfield saviyntproperty="secondaryEmail" sourceproperty="secondaryEmail" type="character"></mapfield>
<mapfield saviyntproperty="departmentNumber" sourceproperty="departmentNumber" type="character"></mapfield>
<mapfield saviyntproperty="departmentname" sourceproperty="departmentname" type="character"></mapfield>
<mapfield saviyntproperty="orgunitid" sourceproperty="orgunitid" type="character"></mapfield>
<mapfield saviyntproperty="employeeclass" sourceproperty="employeeclass" type="character"></mapfield>
<mapfield saviyntproperty="companyname" sourceproperty="companyname" type="character"></mapfield>
<mapfield saviyntproperty="location" sourceproperty="location" type="character"></mapfield>
<mapfield saviyntproperty="locationdesc" sourceproperty="locationdesc" type="character"></mapfield>
<mapfield saviyntproperty="employeeType" sourceproperty="employeeType" type="character"></mapfield>
<mapfield saviyntproperty="jobDescription" sourceproperty="jobDescription" type="character"></mapfield>
<mapfield saviyntproperty="title" sourceproperty="title" type="character"></mapfield>
<mapfield saviyntproperty="secondaryPhone" sourceproperty="secondaryPhone" type="character"></mapfield>
<mapfield saviyntproperty="employeeid" sourceproperty="employeeid" type="character"></mapfield>
<mapfield saviyntproperty="systemUsername" sourceproperty="systemUsername" type="character"></mapfield>
<mapfield saviyntproperty="customproperty10" sourceproperty="AllEmpJobBus" type="character"></mapfield>
<mapfield saviyntproperty="customproperty15" sourceproperty="NameSearchPermit" type="character"></mapfield>
<mapfield saviyntproperty="customproperty7" sourceproperty="PrimaryManagerPosition" type="character"></mapfield>
<mapfield saviyntproperty="customproperty11" sourceproperty="AllEmpAwards" type="character" ></mapfield>
<mapfield saviyntproperty="customproperty12" sourceproperty="AllEmpClevel8" type="character"></mapfield>
<mapfield saviyntproperty="customproperty13" sourceproperty="AllEmpClevels" type="character"></mapfield>
<mapfield saviyntproperty="customproperty10" sourceproperty="AllEmpJobBus" type="character"></mapfield>
<mapfield saviyntproperty="customproperty9" sourceproperty="AllEmpStatus" type="character"></mapfield>
<mapfield saviyntproperty="customproperty14" sourceproperty="DOB" type="character"></mapfield>
<mapfield saviyntproperty="customproperty3" sourceproperty="PrimaryStartReason" type="character"></mapfield>
<mapfield saviyntproperty="customproperty4" sourceproperty="PrimaryStartReasonDesc" type="character"></mapfield>
<mapfield saviyntproperty="customproperty5" sourceproperty="AllStartReason" type="character"></mapfield>
<mapfield saviyntproperty="displayname" sourceproperty="displayname" type="character"></mapfield>
<mapfield saviyntproperty="email" sourceproperty="email" type="character"></mapfield>
<mapfield saviyntproperty="customproperty8" sourceproperty="PrimaryManagerTitle" type="character"></mapfield>
<mapfield saviyntproperty="jobCode" sourceproperty="jobCode" type="character"></mapfield>
<mapfield saviyntproperty="customproperty16" sourceproperty="PrimaryStatus" type="character"></mapfield>
</mapper>
</dataMapping>

And running this job Users Import (Complete) from Database (UserImportFullJob)

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @PragyaPurwar,

Your XML looks fine, Can you please share STATUS_THRESHOLD_CONFIG.

Thanks,

PragyaPurwar
New Contributor II
New Contributor II

It is empty as we are only importing users from the source not accounts

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @PragyaPurwar,

I checking internally if it this feasible or not,
Can you please try  using <userNotInFileAction>INACTIVATE</userNotInFileAction>

Thanks,

<userNotInFileAction>INACTIVATE</userNotInFileAction> tried this , we are stll getting some users which are not present in the view as active

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Pragya,

Can you please confirm if the sql query is returning any inactive accounts as you have mentioned as "getting some users which are not present in the view as active".

Thanks.