and more in a single search tool across platforms. Read the announcement here. |
07/07/2022 04:47 AM
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:
But the userimport job completes without any updates / errors:
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
07/07/2022 06:26 AM
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>
07/07/2022 07:19 AM
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:
:
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
07/07/2022 08:53 AM - edited 07/07/2022 08:53 AM
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
07/08/2022 01:20 AM
Same issues with "userKey", 0 users updated.
07/07/2022 07:53 AM
@yogesh
Yes that is correct! that ensures only updates happen.
07/07/2022 09:08 AM
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
07/08/2022 04:29 AM
Can you try
type=number for userkey
07/08/2022 04:55 AM
still same result with
<mapfield saviyntproperty="userKey" sourceproperty="userKey" type="number"/>