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

Update username with Saviynt For Saviynt userimport

yogesh
Regular Contributor III
Regular Contributor III

So I have below userimport xml for a Saviynt For Saviynt DB Connection:

<dataMapping>
	<before-import>
</before-import>
	<importsettings>
		<zeroDayProvisioning>false</zeroDayProvisioning>
		<zeroDayLimit>150000</zeroDayLimit>
		<userNotInFileAction>NOACTION</userNotInFileAction>
		<checkRules>false</checkRules>
		<generateEmail>false</generateEmail>
		<userReconcillationField>userkey</userReconcillationField>
		<buildUserMap>false</buildUserMap>
		<generateSystemUsername>false</generateSystemUsername>
	</importsettings>
	<sql-query description="This is the Source DB Query">
<![CDATA[
select
userkey
, concat(username,'-deleted') AS username
from USERS where
userkey = 22943
]]></sql-query>
	<mapper description="This is the mapping field for Saviynt Field name">
		<mapfield saviyntproperty="userkey" sourceproperty="userkey" type="Character"/>
		<mapfield saviyntproperty="username" sourceproperty="username" type="Character"/>
	</mapper>
	<after-import description="EMAIL,BATCH,SQL">
</after-import>
</dataMapping>

The SQL seems ok and returns below result in data analyzer:
yogesh_0-1657193972283.png

But the userimport job completes without any updates / errors:

yogesh_1-1657194055103.png
yogesh_2-1657194067404.png

Is there something wrong with my XML?
I want to rename the username for a bunch of users but can not even do it for a hardcoded userkey. I do not want to use any other field as reconciliation field except the userkey, and as per the Saviynt Docs on freshdesk, userkey is supported as a reconciliation field.

Thanks
Yogesh

 

8 REPLIES 8

sahajranajee
Saviynt Employee
Saviynt Employee

Hello,

It could be that userkey is not exposed as a part of the xml mapping for reconciliation field. 

Your XMl is also missing uniquecolumnsascommaseparated parameter. Below is a sample working XML for your reference. You can try adding it and updating the above parameter to userkey as well and see if it works :


<dataMapping>
<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="username">
<![CDATA[select username,'Assign Role' as customproperty21 from users where statuskey=1 and costcenter='ABC12' and customproperty21 is null;]]>
</sql-query>

<importsettings>
<zeroDayProvisioning>false</zeroDayProvisioning>
<generateEmail>false</generateEmail>
<userNotInFileAction>NOACTION</userNotInFileAction>
<checkRules>true</checkRules>
<buildUserMap>false</buildUserMap>
<generateSystemUsername>false</generateSystemUsername>
<userOperationsAllowed>UPDATE</userOperationsAllowed>
<userReconcillationField>username</userReconcillationField>
</importsettings>


<mapper description="This is the mapping field for Saviynt Field name" dateformat="date">
<mapfield saviyntproperty="username" sourceproperty="username" type="character"></mapfield>
<mapfield saviyntproperty="customproperty21" sourceproperty="customproperty21" type="character"></mapfield>
</mapper>
</dataMapping>

 


Regards,
Sahaj Ranajee
Sr. Product Specialist

yogesh
Regular Contributor III
Regular Contributor III

Hi @sahajranajee 
I was going through release notes for v5.5 and found below hence I was trying to use userkey as the reconciliation field:
:yogesh_1-1657201334173.png

One thing I noticed from your XML, 

<userOperationsAllowed>UPDATE</userOperationsAllowed>

Does above config ensure that no inserts will be performed?
What are other valid options for above config? Will keeping INSERT only insert users and no user will be updated? (just curious how this config works)

I'll try adding below attribute to "sql-query" node and see how it goes

 uniquecolumnsascommaseparated="userkey"

Thanks
Yogesh

Note: The default value for the userOperationsAllowed tag is create or update. If no value is specified then the connector will perform both create and update operations.

 

try userKey instead of userkey

Can you try userKey instead of userkey


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

yogesh
Regular Contributor III
Regular Contributor III

Same issues with "userKey", 0 users updated.

sahajranajee
Saviynt Employee
Saviynt Employee

@yogesh 

Yes that is correct! that ensures only updates happen.


Regards,
Sahaj Ranajee
Sr. Product Specialist

yogesh
Regular Contributor III
Regular Contributor III

I tried below but still no update to the username:

<dataMapping>
	<before-import>
</before-import>
	<importsettings>
		<zeroDayProvisioning>false</zeroDayProvisioning>
		<zeroDayLimit>150000</zeroDayLimit>
		<userNotInFileAction>NOACTION</userNotInFileAction>
		<checkRules>false</checkRules>
		<generateEmail>false</generateEmail>
		<userReconcillationField>userkey</userReconcillationField>
		<buildUserMap>false</buildUserMap>
		<generateSystemUsername>false</generateSystemUsername>
		<userOperationsAllowed>UPDATE</userOperationsAllowed>
	</importsettings>
	<sql-query description="This is the Source DB Query" uniquecolumnsascommaseparated="userkey" >
<![CDATA[
select
userkey
, concat(username,'-test') AS username
from USERS where
userkey = 20457
]]></sql-query>
	<mapper description="This is the mapping field for Saviynt Field name">
		<mapfield saviyntproperty="userkey" sourceproperty="userkey" type="Character"/>
		<mapfield saviyntproperty="username" sourceproperty="username" type="Character"/>
	</mapper>
	<after-import description="EMAIL,BATCH,SQL">
</after-import>
</dataMapping>

I even tried running without the line :

<mapfield saviyntproperty="userkey" sourceproperty="userkey" type="Character"/>

Yogesh

Can you try

type=number for userkey


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

yogesh
Regular Contributor III
Regular Contributor III

still same result with

<mapfield saviyntproperty="userKey" sourceproperty="userKey" type="number"/>