<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello Sylvaire-Kevin,</p>
    <p>as for the duplicate records: you are probably using some query
      filter to select only a subset of users, aren't you? Or maybe
      there is some authorization in effect that implies such a filter.
      <br>
    </p>
    <p>Then there are various options:</p>
    <ol>
      <li>try to rewrite the filter e.g. by using 'exists' keyword (if
        applicable) - but I am afraid this will help only quite rarely;</li>
      <li>use 'distinct' search query option - but I am not sure if this
        is supported in your version of midPoint;</li>
      <li>use a custom script (embedded in bulk action, invoked by
        execute-script action) to count the objects and then return only
        the final number (see /rpc/execute-script call). The bulk action
        could then call model service 'count' operation using the
        'distinct' keyword.</li>
    </ol>
    <p>Please see our wiki for more information.<br>
    </p>
    <p>Best regards,<br>
    </p>
    <pre class="moz-signature" cols="72">Pavol Mederly
Software developer
evolveum.com
</pre>
    <div class="moz-cite-prefix">On 04.06.2018 9:26, Sylvaire kevin TIPA
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:HE1PR0902MB19619B025EB234572C94D8DBC1670@HE1PR0902MB1961.eurprd09.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></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">Hey guy,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span lang="EN-GB">I try to make a REST
            call to MP for count the number of users. Currently, I just
            call /users endpoints and parse XML for count user (do you
            have better solution) ?
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">When I call
            urL/rest.users , I get a xml with many time the same users …
            it’s normal ? How I can limit it to unique user ?
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:FR"><img
              id="Image_x0020_2"
              src="cid:part1.C2FD5EAF.5CF79B75@evolveum.com" class=""
              height="691" width="1183"></span>
          <span lang="EN-GB"><o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;color:black;mso-fareast-language:FR">Cordialement,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;color:black;mso-fareast-language:FR"><o:p> </o:p></span></p>
        <table class="MsoNormalTable"
          style="width:100.0%;border:none;border-top:solid #00BBDF
          3.0pt" cellspacing="0" cellpadding="0" width="100%" border="1">
          <tbody>
            <tr>
              <td style="width:225.75pt;border:none;padding:0cm 0cm 0cm
                0cm" valign="top" width="708">
                <p class="MsoNormal" style="line-height:105%"><span
                    style="color:black"><o:p> </o:p></span></p>
                <p class="MsoNormal" style="line-height:105%"><span
                    style="mso-fareast-language:FR"><img
                      id="Image_x0020_1"
                      src="cid:part2.306EE82F.53C8B840@evolveum.com"
                      alt="cid:8e2f30c3-f5eb-4f4e-aefb-9d083f8a3b45"
                      class="" height="22" width="174"></span><span
                    style="color:black"><o:p></o:p></span></p>
                <p class="MsoNormal" style="line-height:105%"><span
                    style="color:black"><o:p> </o:p></span></p>
                <p class="MsoNormal" style="line-height:105%"><b><span
style="font-size:10.0pt;line-height:105%;font-family:"Arial",sans-serif;color:#1F497D">Sylvaire-Kevin
                      TIPA</span></b><i><span
                      style="font-size:10.0pt;line-height:105%;color:#757B80">
                      <o:p></o:p></span></i></p>
                <p class="MsoNormal" style="line-height:105%"><i><span
                      style="font-size:10.0pt;line-height:105%;color:#767171">Thales
                      Services / OIC / DevOps Automatisation
                      Infrastructures<o:p></o:p></span></i></p>
                <p class="MsoNormal" style="line-height:105%"><span
                    style="color:#BFBFBF">…………………………………………………………………………………………<o:p></o:p></span></p>
                <p class="MsoNormal" style="line-height:105%"><span
                    style="font-size:9.0pt;line-height:105%;color:gray">THALES
                    SERVICES SAS<br>
                    44 Quai Charles de Gaulle<br>
                    CS 20100<br>
                    69463 Lyon Cedex 06<o:p></o:p></span></p>
                <p class="MsoNormal" style="line-height:105%"><span
                    style="color:#BFBFBF">…………………………………………………………………………………………<o:p></o:p></span></p>
                <p class="MsoNormal" style="line-height:105%"><span
                    style="color:#1F497D"><a
                      href="http://www.thalesgroup.com/"
                      moz-do-not-send="true"><span
style="font-size:8.5pt;line-height:105%;font-family:"Arial",sans-serif;color:gray">www.thalesgroup.com</span></a></span><span
                    style="color:#BFBFBF"><o:p></o:p></span></p>
                <p class="MsoNormal" style="line-height:105%"><span
                    style="color:black"><o:p> </o:p></span></p>
              </td>
            </tr>
          </tbody>
        </table>
        <p class="MsoNormal"><span
            style="color:black;display:none;mso-fareast-language:FR"><o:p> </o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <p style="font-size:8pt; line-height:10pt; font-family:
        'Cambria','times roman',serif;">
        This message contains confidential information and is intended
        only for the individual(s) addressed in the message. If you are
        not the named addressee, you should not disseminate, distribute,
        or copy this e-mail. If you are not the intended recipient, you
        are notified that disclosing, distributing, or copying this
        e-mail is strictly prohibited.
      </p>
      <!--'"--><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>
  </body>
</html>