<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Aivo,</p>
    <p>what attribute is configured as unique identifier in your CSV
      resource....?</p>
    <p>Ivan<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 11/24/2016 10:18 PM, Aivo Kuhlberg
      wrote:<br>
    </div>
    <blockquote cite="mid:1480022316394.48440@rmit.ee" type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
        {margin-top:0;
        margin-bottom:0}--></style>
      <p>Hello,<br>
      </p>
      <p>In our HR system the same person can appear multiple times, for
        example when he/she has 2 jobs.  My problem is how to import
        these users to midPoint? Even when the same user appears
        multiple times in HR system I want to see in midPoint only one
        user. So I believe I have to import both accounts under one
        midPoint user where these should appear as separate projections.</p>
      <p>Below is the example CSV-file which I tested. Here I try to
        import the same user multiple times and in synchronization
        settings I am correlating users by personalcode attribute which
        is unique for every person:<br>
      </p>
      <p><br>
      </p>
      <p>"sapcode","personalcode","firstname","lastname","email","title"<br>
"8000001","10101010001","John","Smith",<a class="moz-txt-link-rfc2396E" href="mailto:john.smith@org.com">"john.smith@org.com"</a>,"Specialist"<br>
"8000011","10101010001","John","Smith",<a class="moz-txt-link-rfc2396E" href="mailto:john.smith@org1.com">"john.smith@org1.com"</a>,"Adviser"<br>
         <br>
      </p>
      <p>Unfortunately when I import that file then first line is
        imported successfully but second line fails:<br>
      </p>
      <p><br>
      </p>
      <p>2016-11-24 22:31:38,733 [] [midPointScheduler_Worker-5] INFO
(com.evolveum.midpoint.model.impl.util.AbstractSearchIterativeResultHandler):
        Import object
        shadow:d8cb8f9d-4209-42c8-8d97-7f9392e86edd(8000001) from
        <a class="moz-txt-link-freetext" href="resource:920cc5ee-ef7e-4d7b-9bcd-cc4edf60439e(HR">resource:920cc5ee-ef7e-4d7b-9bcd-cc4edf60439e(HR</a> users) done
        with status SUCCESS (this one: 352 ms, avg: 352 ms) (total
        progress: 1, wall clock avg: 434 ms)<br>
        2016-11-24 22:31:38,897 [] [midPointScheduler_Worker-5] ERROR
        (com.evolveum.midpoint.model.impl.sync.SynchronizationServiceImpl):
        SYNCHRONIZATION: Error in synchronization on
        <a class="moz-txt-link-freetext" href="resource:920cc5ee-ef7e-4d7b-9bcd-cc4edf60439e(HR">resource:920cc5ee-ef7e-4d7b-9bcd-cc4edf60439e(HR</a> users) for
        situation UNMATCHED: ObjectAlreadyExistsException: Error
        processing focus(user:null(john.smith)): constraint violation:
        Found conflicting existing object with property name =
        PP({.../common/common-3}name):[PPV(PolyString:john.smith)]:
        user:c74b5771-f8dc-4929-83a1-2afbf2a8f875(john.smith). Change
        was
ResourceObjectShadowChangeDescription(objectDelta=ObjectDelta(ShadowType:48764d07-8db2-4555-ac5a-4d7c5a9f446b,ADD:
        shadow:48764d07-8db2-4555-ac5a-4d7c5a9f446b(8000011)),
        currentShadow=shadow:48764d07-8db2-4555-ac5a-4d7c5a9f446b(8000011),
        oldShadow=null,
sourceChannel=<a class="moz-txt-link-freetext" href="http://midpoint.evolveum.com/xml/ns/public/provisioning/channels-3#import">http://midpoint.evolveum.com/xml/ns/public/provisioning/channels-3#import</a>,
        resource=<a class="moz-txt-link-freetext" href="resource:920cc5ee-ef7e-4d7b-9bcd-cc4edf60439e(HR">resource:920cc5ee-ef7e-4d7b-9bcd-cc4edf60439e(HR</a> users)<br>
      </p>
      <p><br>
      </p>
      <p>What I am doing wrong?</p>
      <p>Thanks,</p>
      <p>Aivo Kuhlberg<br>
      </p>
      <br>
      <hr>
      <font color="Gray" face="Arial" size="2">Käesolev e-kiri võib
        sisaldada asutusesiseseks kasutamiseks tunnistatud teavet.<br>
        This e-mail may contain information which is classified for
        official use.</font>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Ivan Noris
Senior Identity Engineer
evolveum.com
</pre>
  </body>
</html>