Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Account - entitlement Correlation is not working Via DB Connector

KME
New Contributor III
New Contributor III

Hi Folks,

We have a customized view to import accounts and entitlements. The customized view has the following details:
account name, account status, Custom Value (Which correlates Accounts with users), Entitlement value, Entitlement ID, entitlement type.

We tried to use above columns in XML but Account -  entitlement correlation is not happening. However, We succeeded to import Accounts and Entitlements.

Could anyone help us how we need to achieve account - entitlements correlation.

Please find the below xml's for reference:
1. <dataMapping>
<before-import>
</before-import>
<sql-query description="This is the Source DB Query">
<![CDATA[SELECT distinct USER_ROLE as EntitlementValue, USER_ROLE as EntitlementName, 'role' as EntitlementType, 'EHC-EPIC' AS systemname,'EHC-EPIC' AS endpoint, '1' as status,USER_ID AS accountname FROM XXXX WHERE USER_ROLE is not null
UNION
SELECT distinct TEMPLATE_ID as EntitlementValue, TEMPLATE_NAME as EntitlementName, 'template' as EntitlementType,'EHC-EPIC' AS systemname, 'EHC-EPIC' AS endpoint, '1' as status,USER_ID AS accountname FROM XXXX WHERE TEMPLATE_ID is not null
UNION
SELECT distinct SUBTEMPLATE_ID as EntitlementValue, USER_SUBTEMPLATE_NAME as EntitlementName, 'subtemplate' as EntitlementType,'EHC-EPIC' AS systemname, 'EHC-EPIC' AS endpoint, '1' as status,USER_ID AS accountname FROM XXXXX WHERE SUBTEMPLATE_ID is not null
]]>
</sql-query>
<mapper description="This is the mapping field for Saviynt Field name" deleteentitlementowner="false" entnotpresentaction="noaction" ifentitlementvalue1notexists="create" createentitlementtype="true" systems="'EHC-EPIC'">
<mapfield saviyntproperty="entitlementvalues.entitlement_value" sourceproperty="EntitlementValue" type="character"></mapfield>
<mapfield saviyntproperty="entitlementvalues.displayname" sourceproperty="EntitlementName" type="character"></mapfield>
<mapfield saviyntproperty="entitlementtypes.entitlementname" sourceproperty="entitlementtype" type="character"></mapfield>
<mapfield saviyntproperty="securitysystems.systemname" sourceproperty="systemname" type="character"></mapfield>
<mapfield saviyntproperty="endpoints.endpointname" sourceproperty="endpoint" type="character"></mapfield>
<mapfield saviyntproperty="entitlementvalues.status" sourceproperty="status" type="number"></mapfield>
<mapfield sourceproperty="accountname" saviyntproperty="accounts.name" type="number"></mapfield>
</mapper>
<after-import description="EMAIL,BATCH,SQL">
</after-import>
</dataMapping>

============================================

2. <dataMapping>
<before-import>
</before-import>
<sql-query description="This is the Source DB Query">
<![CDATA[SELECT ECDV1.USER_ROLE as EntitlementValue, ECDV1.USER_ROLE as EntitlementName, 'role' as EntitlementType, 'EHC-EPIC' AS systemname,'EHC-EPIC' AS endpoint, '1' as status,ECDV1.USER_ID AS accountname,(Case when ECDV1.USER_STATUS in ('Active','ACTIVE','active') then '1' else '2' end) as statuskey FROM dbo.V_SAVIYNT_CLARITY_EMP ECDV1 inner join dbo.V_SAVIYNT_CLARITY_EMP ECDV2 on ECDV1.USER_ID = ECDV2.USER_ID and ECDV1.USER_ROLE = ECDV2.USER_ROLE WHERE ECDV1.USER_ROLE is not null
UNION
SELECT ECDV1.TEMPLATE_ID as EntitlementValue, ECDV1.TEMPLATE_NAME as EntitlementName, 'template' as EntitlementType,'EHC-EPIC' AS systemname, 'EHC-EPIC' AS endpoint, '1' as status,ECDV1.USER_ID AS accountname,(Case when ECDV1.USER_STATUS in ('Active','ACTIVE','active') then '1' else '2' end) as statuskey FROM dbo.V_SAVIYNT_CLARITY_EMP ECDV1 inner join dbo.V_SAVIYNT_CLARITY_EMP ECDV2 on ECDV1.USER_ID = ECDV2.USER_ID and ECDV1.TEMPLATE_ID = ECDV2.TEMPLATE_ID WHERE ECDV1.TEMPLATE_ID is not null
UNION
SELECT ECDV1.SUBTEMPLATE_ID as EntitlementValue, ECDV1.USER_SUBTEMPLATE_NAME as EntitlementName, 'subtemplate' as EntitlementType,'EHC-EPIC' AS systemname, 'EHC-EPIC' AS endpoint, '1' as status,ECDV1.USER_ID AS accountname,(Case when ECDV1.USER_STATUS in ('Active','ACTIVE','active') then '1' else '2' end) as statuskey FROM dbo.V_SAVIYNT_CLARITY_EMP ECDV1 inner join dbo.V_SAVIYNT_CLARITY_EMP ECDV2 on ECDV1.USER_ID = ECDV2.USER_ID and ECDV1.SUBTEMPLATE_ID = ECDV2.SUBTEMPLATE_ID WHERE ECDV1.SUBTEMPLATE_ID is not null
]]>
</sql-query>
<mapper description="This is the mapping field for Saviynt Field name" deleteentitlementowner="false" entnotpresentaction="noaction" ifentitlementvalue1notexists="create" createentitlementtype="true" systems="'EHC-EPIC'">
<mapfield saviyntproperty="entitlementvalues.entitlement_value" sourceproperty="EntitlementValue" type="character"></mapfield>
<mapfield saviyntproperty="entitlementvalues.displayname" sourceproperty="EntitlementName" type="character"></mapfield>
<mapfield saviyntproperty="entitlementtypes.entitlementname" sourceproperty="entitlementtype" type="character"></mapfield>
<mapfield saviyntproperty="securitysystems.systemname" sourceproperty="systemname" type="character"></mapfield>
<mapfield saviyntproperty="endpoints.endpointname" sourceproperty="endpoint" type="character"></mapfield>
<mapfield saviyntproperty="entitlementvalues.status" sourceproperty="status" type="number"></mapfield>
<mapfield saviyntproperty="accounts.name" sourceproperty="accountname" type="number"></mapfield>
<mapfield saviyntproperty="accounts.status" sourceproperty="statuskey" type="number"></mapfield>
</mapper>
<after-import description="EMAIL,BATCH,SQL">
</after-import>
</dataMapping>

2 REPLIES 2

rushikeshvartak
All-Star
All-Star
  • Update below 
  • <mapfield saviyntproperty="accounts.name" sourceproperty="accountname" type="character"></mapfield>

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

dgandhi
All-Star
All-Star

Try below:

<dataMapping>
<before-import>
</before-import>
<sql-query description="This is the Source DB Query">
<![CDATA[SELECT distinct USER_ROLE as EntitlementValue, USER_ROLE as EntitlementName, 'role' as EntitlementType, 'EHC-EPIC' AS systemname,'EHC-EPIC' AS endpoint, '1' as status,USER_ID AS accountname FROM XXXX WHERE USER_ROLE is not null
UNION
SELECT distinct TEMPLATE_ID as EntitlementValue, TEMPLATE_NAME as EntitlementName, 'template' as EntitlementType,'EHC-EPIC' AS systemname, 'EHC-EPIC' AS endpoint, '1' as status,USER_ID AS accountname FROM XXXX WHERE TEMPLATE_ID is not null
UNION
SELECT distinct SUBTEMPLATE_ID as EntitlementValue, USER_SUBTEMPLATE_NAME as EntitlementName, 'subtemplate' as EntitlementType,'EHC-EPIC' AS systemname, 'EHC-EPIC' AS endpoint, '1' as status,USER_ID AS accountname FROM XXXXX WHERE SUBTEMPLATE_ID is not null
]]>
</sql-query>
<mapper description="This is the mapping field for Saviynt Field name" deleteentitlementowner="false" entnotpresentaction="noaction" ifentitlementvalue1notexists="create" createentitlementtype="true" systems="'EHC-EPIC'">
<mapfield saviyntproperty="entitlementvalues.entitlement_value" sourceproperty="EntitlementValue" type="character"></mapfield>
<mapfield saviyntproperty="entitlementvalues.displayname" sourceproperty="EntitlementName" type="character"></mapfield>
<mapfield saviyntproperty="entitlementtypes.entitlementname" sourceproperty="entitlementtype" type="character"></mapfield>
<mapfield saviyntproperty="securitysystems.systemname" sourceproperty="systemname" type="character"></mapfield>
<mapfield saviyntproperty="endpoints.endpointname" sourceproperty="endpoint" type="character"></mapfield>
<mapfield saviyntproperty="entitlementvalues.status" sourceproperty="status" type="number"></mapfield>
<mapfield saviyntproperty="accounts.name" sourceproperty="accountname" type="character"></mapfield>
</mapper>
<after-import description="EMAIL,BATCH,SQL">
</after-import>
</dataMapping>

<dataMapping>
<before-import>
</before-import>
<sql-query description="This is the Source DB Query">
<![CDATA[SELECT ECDV1.USER_ROLE as EntitlementValue, ECDV1.USER_ROLE as EntitlementName, 'role' as EntitlementType, 'EHC-EPIC' AS systemname,'EHC-EPIC' AS endpoint, '1' as status,ECDV1.USER_ID AS accountname,(Case when ECDV1.USER_STATUS in ('Active','ACTIVE','active') then '1' else '2' end) as statuskey FROM dbo.V_SAVIYNT_CLARITY_EMP ECDV1 inner join dbo.V_SAVIYNT_CLARITY_EMP ECDV2 on ECDV1.USER_ID = ECDV2.USER_ID and ECDV1.USER_ROLE = ECDV2.USER_ROLE WHERE ECDV1.USER_ROLE is not null
UNION
SELECT ECDV1.TEMPLATE_ID as EntitlementValue, ECDV1.TEMPLATE_NAME as EntitlementName, 'template' as EntitlementType,'EHC-EPIC' AS systemname, 'EHC-EPIC' AS endpoint, '1' as status,ECDV1.USER_ID AS accountname,(Case when ECDV1.USER_STATUS in ('Active','ACTIVE','active') then '1' else '2' end) as statuskey FROM dbo.V_SAVIYNT_CLARITY_EMP ECDV1 inner join dbo.V_SAVIYNT_CLARITY_EMP ECDV2 on ECDV1.USER_ID = ECDV2.USER_ID and ECDV1.TEMPLATE_ID = ECDV2.TEMPLATE_ID WHERE ECDV1.TEMPLATE_ID is not null
UNION
SELECT ECDV1.SUBTEMPLATE_ID as EntitlementValue, ECDV1.USER_SUBTEMPLATE_NAME as EntitlementName, 'subtemplate' as EntitlementType,'EHC-EPIC' AS systemname, 'EHC-EPIC' AS endpoint, '1' as status,ECDV1.USER_ID AS accountname,(Case when ECDV1.USER_STATUS in ('Active','ACTIVE','active') then '1' else '2' end) as statuskey FROM dbo.V_SAVIYNT_CLARITY_EMP ECDV1 inner join dbo.V_SAVIYNT_CLARITY_EMP ECDV2 on ECDV1.USER_ID = ECDV2.USER_ID and ECDV1.SUBTEMPLATE_ID = ECDV2.SUBTEMPLATE_ID WHERE ECDV1.SUBTEMPLATE_ID is not null
]]>
</sql-query>
<mapper description="This is the mapping field for Saviynt Field name" deleteentitlementowner="false" entnotpresentaction="noaction" ifentitlementvalue1notexists="create" createentitlementtype="true" systems="'EHC-EPIC'">
<mapfield saviyntproperty="entitlementvalues.entitlement_value" sourceproperty="EntitlementValue" type="character"></mapfield>
<mapfield saviyntproperty="entitlementvalues.displayname" sourceproperty="EntitlementName" type="character"></mapfield>
<mapfield saviyntproperty="entitlementtypes.entitlementname" sourceproperty="entitlementtype" type="character"></mapfield>
<mapfield saviyntproperty="securitysystems.systemname" sourceproperty="systemname" type="character"></mapfield>
<mapfield saviyntproperty="endpoints.endpointname" sourceproperty="endpoint" type="character"></mapfield>
<mapfield saviyntproperty="entitlementvalues.status" sourceproperty="status" type="number"></mapfield>
<mapfield saviyntproperty="accounts.name" sourceproperty="accountname" type="character"></mapfield>
<mapfield saviyntproperty="accounts.status" sourceproperty="statuskey" type="number"></mapfield>
</mapper>
<after-import description="EMAIL,BATCH,SQL">
</after-import>
</dataMapping>

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.