<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Konstantin,</p>
    <p>well, in my situation it worked with the following notes:</p>
    <p>- the resource was authoritative, delete -> inactivateFocus</p>
    <p>- no multiaccounts inbound feature used</p>
    <p>- the consistency set for deadShadowsRetentionPeriod 0</p>
    <p>I'm using that setup in our training which is based on 4.0.1 (or
      4.0.2).<br>
    </p>
    <p>One thing that disturbs me is your resource where for your
      <reaction> element you have
      <reconcile>false</reconcile> and also
      <tolerant>false</tolerant> for your attributes. These
      are not defaults.</p>
    <p>Ivan<br>
    </p>
    <div class="moz-cite-prefix">On 26. 6. 2020 13:06, Konstantin
      Tikhonov wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CY4PR14MB1238E1F14B43AA58DED06403F6930@CY4PR14MB1238.namprd14.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:36.0pt;
        mso-add-space:auto;
        text-indent:-18.0pt;
        mso-list:l1 level1 lfo2;
        font-size:10.0pt;
        font-family:"Tahoma",sans-serif;}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
        {mso-style-priority:34;
        mso-style-type:export-only;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:36.0pt;
        mso-add-space:auto;
        text-indent:-18.0pt;
        mso-list:l1 level1 lfo2;
        font-size:10.0pt;
        font-family:"Tahoma",sans-serif;}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
        {mso-style-priority:34;
        mso-style-type:export-only;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:36.0pt;
        mso-add-space:auto;
        text-indent:-18.0pt;
        mso-list:l1 level1 lfo2;
        font-size:10.0pt;
        font-family:"Tahoma",sans-serif;}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
        {mso-style-priority:34;
        mso-style-type:export-only;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:36.0pt;
        mso-add-space:auto;
        text-indent:-18.0pt;
        mso-list:l1 level1 lfo2;
        font-size:10.0pt;
        font-family:"Tahoma",sans-serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle26
        {mso-style-type:personal-compose;
        font-family:"Tahoma",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:8801570;
        mso-list-type:hybrid;
        mso-list-template-ids:545568682 1961009778 68747289 68747291 68747279 68747289 68747291 68747279 68747289 68747291;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1
        {mso-list-id:729890094;
        mso-list-type:hybrid;
        mso-list-template-ids:1101400628 -277075238 68747289 68747291 68747279 68747289 68747291 68747279 68747289 68747291;}
@list l1:level1
        {mso-level-style-link:"List Paragraph";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2
        {mso-list-id:927539056;
        mso-list-type:hybrid;
        mso-list-template-ids:-1962621730 68747279 68747289 68747291 68747279 68747289 68747291 68747279 68747289 68747291;}
@list l2:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US">Hi Ivan.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US">Thank you for your response.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US">I added the section:<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US">    <consistency><o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US">       
            <deadShadowRetentionPeriod>PT0H</deadShadowRetentionPeriod><o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US">    </consistency><o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US">to the CSV resource but unfortunately it didn’t
            fix synchronization. Synchronization doesn’t mark an account
            as deleted, it remains LINKED. But when I clicked to the
            account (perhaps some local sync task for one account runs
            in this case) the shadow is removed.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US">So in terms of the ticket you sent my scenario
            looks as follows<o:p></o:p></span></p>
        <p class="MsoListParagraphCxSpFirst" style="mso-list:l2 level1
          lfo3"><!--[if !supportLists]--><span lang="EN-US"><span
              style="mso-list:Ignore">1.<span style="font:7.0pt
                "Times New Roman"">   
              </span></span></span><!--[endif]--><span lang="EN-US">account
            doesn't exist in target system.<o:p></o:p></span></p>
        <p class="MsoListParagraphCxSpMiddle" style="mso-list:l2 level1
          lfo3"><!--[if !supportLists]--><span lang="EN-US"><span
              style="mso-list:Ignore">2.<span style="font:7.0pt
                "Times New Roman"">   
              </span></span></span><!--[endif]--><span lang="EN-US">user
            exists in midpoint.<o:p></o:p></span></p>
        <p class="MsoListParagraphCxSpMiddle" style="mso-list:l2 level1
          lfo3"><!--[if !supportLists]--><span lang="EN-US"><span
              style="mso-list:Ignore">3.<span style="font:7.0pt
                "Times New Roman"">   
              </span></span></span><!--[endif]--><span lang="EN-US">sync
            configuration deleted -> unlink, unlinked -> unlink.<o:p></o:p></span></p>
        <p class="MsoListParagraphCxSpLast" style="mso-list:l2 level1
          lfo3"><!--[if !supportLists]--><span lang="EN-US"><span
              style="mso-list:Ignore">4.<span style="font:7.0pt
                "Times New Roman"">   
              </span></span></span><!--[endif]--><span lang="EN-US">sync
            DOESN’T MARK shadow as deleted, shadow stays.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US">And actually we don’t need to delete a shadow
            immediately, to mark it as deleted would be enough. I
            removed <deadShadowRetentionPeriod> parameter from the
            resource.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US">May be, I do something wrong? Please, let me
            know.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US">Thanks.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US"><o:p> </o:p></span></p>
        <div>
          <p class="MsoNormal"><b><span
style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:black;mso-fareast-language:CS"
                lang="EN-US">--<o:p></o:p></span></b></p>
          <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:black;mso-fareast-language:CS"
              lang="EN-US">Best Regards,<o:p></o:p></span></p>
          <p class="MsoNormal"><b><span
style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:black;mso-fareast-language:CS"
                lang="EN-US"><o:p> </o:p></span></b></p>
          <p class="MsoNormal"><b><span
style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:black;mso-fareast-language:CS"
                lang="EN-US">Konstantin.</span></b><span lang="EN-US"><o:p></o:p></span></p>
        </div>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
            lang="EN-US"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span
                lang="EN-US"> midPoint
                <a class="moz-txt-link-rfc2396E" href="mailto:midpoint-bounces@lists.evolveum.com"><midpoint-bounces@lists.evolveum.com></a>
                <b>On Behalf Of </b>Ivan Noris<br>
                <b>Sent:</b> Friday, June 26, 2020 9:14 AM<br>
                <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a><br>
                <b>Subject:</b> Re: [midPoint] A problem with
                synchronization<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
        <p><span lang="EN-US">Hi Konstantin,<o:p></o:p></span></p>
        <p><span lang="EN-US">you may want to apply the fragment from <a
              href="https://jira.evolveum.com/browse/MID-5452"
              moz-do-not-send="true">
              https://jira.evolveum.com/browse/MID-5452</a><o:p></o:p></span></p>
        <p><span lang="EN-US">I remember I had some hard time with that,
            but as seen in the JIRA comments, during some time period it
            also worked without that workaround.<o:p></o:p></span></p>
        <p><span lang="EN-US">Unfortunately I can't point you to a
            documentation in this case. But the
            deadShadowRetentionPeriod should help you in this particular
            case.<o:p></o:p></span></p>
        <p><span lang="EN-US">Best regards,<o:p></o:p></span></p>
        <p><span lang="EN-US">Ivan<o:p></o:p></span></p>
        <div>
          <p class="MsoNormal"><span lang="EN-US">On 26. 6. 2020 3:12,
              Konstantin Tikhonov wrote:<o:p></o:p></span></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span
              style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
              lang="EN-US">Hello Colleagues.</span><span lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
              lang="EN-US"> </span><span lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
              lang="EN-US">I have a strange problem with
              synchronization.</span><span lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
              lang="EN-US"> </span><span lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
              lang="EN-US">I configured CSV resource (XML attached) and
              it works good. But when I delete account in the CSV file
              midPoint shows that it’s absent in the Resource tab but
              still present and even LINKED in the Repository one
              (screenshots 1, 2 also attached). I run synchronization
              many times but it doesn’t help.</span><span lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
              lang="EN-US"> </span><span lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
              lang="EN-US">And one more strange thing – if I click to
              the deleted account in Repository tab it opens with
              Username field filled only (screenshot 3) and after that
              in the Repository tab it gets marked DELETED and with Dead
              Shadow (screenshot 4) as it should be.</span><span
              lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
              lang="EN-US"> </span><span lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
              lang="EN-US">Could you please help to fix this issue?</span><span
              lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
              lang="EN-US"> </span><span lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
              lang="EN-US">Thank you in advance.</span><span
              lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="font-size:10.0pt;font-family:"Tahoma",sans-serif"
              lang="EN-US"> </span><span lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><b><span
style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:black;mso-fareast-language:CS"
                lang="EN-US">--</span></b><span lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:black;mso-fareast-language:CS"
              lang="EN-US">Best Regards,</span><span lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><b><span
style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:black;mso-fareast-language:CS"
                lang="EN-US"> </span></b><span lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><b><span
style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:black;mso-fareast-language:CS"
                lang="EN-US">Konstantin
              </span></b><span lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US"><br>
              <br>
              <o:p></o:p></span></p>
          <pre><span lang="EN-US">_______________________________________________<o:p></o:p></span></pre>
          <pre><span lang="EN-US">midPoint mailing list<o:p></o:p></span></pre>
          <pre><span lang="EN-US"><a href="mailto:midPoint@lists.evolveum.com" moz-do-not-send="true">midPoint@lists.evolveum.com</a><o:p></o:p></span></pre>
          <pre><span lang="EN-US"><a href="https://lists.evolveum.com/mailman/listinfo/midpoint" moz-do-not-send="true">https://lists.evolveum.com/mailman/listinfo/midpoint</a><o:p></o:p></span></pre>
        </blockquote>
        <pre><span lang="EN-US">-- <o:p></o:p></span></pre>
        <pre><span lang="EN-US">Ivan Noris<o:p></o:p></span></pre>
        <pre><span lang="EN-US">Senior Identity Engineer<o:p></o:p></span></pre>
        <pre><span lang="EN-US">evolveum.com<o:p></o:p></span></pre>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-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="https://lists.evolveum.com/mailman/listinfo/midpoint">https://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Ivan Noris
Senior Identity Engineer
evolveum.com
</pre>
  </body>
</html>