CSV
User data from a CSV file can be read via the CsvSyncSource.
Here it is required that the CSV file has headers and that there exists a column which provides unique values for user synchronization.
ℹ️ Info Mapping is supported as well.
Configuration
<?xml version="1.0" encoding="utf-8"?>
<UserSyncConfig>
<CsvSyncSource name="Csv" queryKey="OneOffixxIdentifier">
<FilePath>\\Share\Users.csv</FilePath>
<Delimiter>;</Delimiter>
<!-- Column name for user lookup -->
<KeyColumnName>sid</KeyColumnName>
<!-- Optional: Prevents "stale" data to be synchronized -->
<TreatFileAsStaleAfterHours>24</TreatFileAsStaleAfterHours>
<!-- Optional: Result Mapping Syntax is supported -->
<ResultMapping>
<Mapping>
<Map Source="email" Target="fromMappingEMail" />
</Mapping>
</ResultMapping>
<!-- Claim Mapping - column names are property names-->
<Claims>
<Claim type="http://schema.oneoffixx.com/ws/2011/01/identity/claims/displayName" ignoreClaimIfEmpty="true" property="displayName" />
<Claim type="http://schema.oneoffixx.com/ws/2011/01/identity/claims/email" ignoreClaimIfEmpty="true" property="fromMappingEMail" />
</Claims>
</CsvSyncSource>
</UserSyncConfig>
Options
In addition to the common SyncSource attributes (name, queryKey, …), the following elements are available:
| Element | Required | Description |
|---|---|---|
FilePath | yes | Path to the CSV file (e.g. a network share). |
Delimiter | yes | Delimiter between the columns (e.g. ;). |
KeyColumnName | yes | Name of the column used to look up the user. |
TreatFileAsStaleAfterHours | no | Prevents synchronization of stale data: if the file is older than the specified number of hours, it is not used. |
ResultMapping | no | Optional mapping of the columns to target values. |