<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">I reply to myself if someone else search this information, here the java code for check in resource (it's really simple at the end :p )
<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><span>def edirRessource = midpoint.searchObjectByName(ResourceType.class, "edir-CSV")</span><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div> ResourceSchema resourceSchema = RefinedResourceSchemaImpl.getResourceSchema(edirRessource, prismContext);<br>
                                    ObjectClassComplexTypeDefinition objectClassDef = resourceSchema.findObjectClassDefinition(SchemaConstants.ACCOUNT_OBJECT_CLASS_LOCAL_NAME);<br>
                                   <br>
                                    qnameMail = new QName(edirRessource.getNamespace(), "MAIL")                <br>
                                                                 <br>
                                    ObjectQuery query = QueryBuilder.queryFor(ShadowType.class, prismContext)<br>
                                          .item(ShadowType.F_RESOURCE_REF).ref(edirRessource.getOid())<br>
                                          .and()<br>
                                          .item(ShadowType.F_OBJECT_CLASS).eq(new QName(edirRessource.getNamespace(), "AccountObjectClass"))<br>
                                          .and()<br>
                                          .item(new ItemPath(ShadowType.F_ATTRIBUTES, SchemaConstants.ICFS_NAME),objectClassDef.findAttributeDefinition(SchemaConstants.ICFS_NAME)).eq(user.getName().toString().toUpperCase())<br>
                                          .build();<br>
                                 <br>
                                    shadowQueryResult = midpoint.searchObjects(ShadowType.class, query)<br>
                               <br>
                                    <br>
                                    if(shadowQueryResult){<br>
                                    <br>
                                      <br>
                                        for(shadow in shadowQueryResult){<br>
                 <br>
                                            log.info("shadow details : " + ShadowUtil.getAttributeValue(shadow, qnameMail))<br>
                                        }<br>
                                    }</div>
<br>
<p></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<br>
<p style="margin-top:0; margin-bottom:0">Cordialement. </p>
<table class="MsoNormalTable" style="width:100.0%; border:none; border-top:solid #00BBDF 3.0pt" width="100%" cellspacing="0" cellpadding="0" border="1">
<tbody>
<tr>
<td style="border:medium none; padding:0cm; width:301px" valign="top"></td>
</tr>
</tbody>
</table>
<table class="ms-rteTable-clear" style="border-collapse:collapse; table-layout:fixed; border:1px solid transparent" cellspacing="0">
<tbody>
<tr class="ms-rteTableEvenRow-clear" style="border-collapse:collapse; border:1px solid transparent; background-color:rgba(255,255,255,0.85)">
<td class="ms-rteTableEvenCol-clear" style="border-collapse:collapse; width:208px; border:1px solid transparent">
<b><span style="background-color:rgb(255,255,255); color:rgb(0,111,201)">Sylvaire-Kevin TIPA</span></b><br>
<div><i><span style="font-size:10pt; color:rgb(117,123,128)">Thales Services / OIC INFRAS</span><br>
</i><span style="font-size:10pt; color:rgb(117,123,128)"><i>Devops Infrastructure Automation</i></span></div>
</td>
<td class="ms-rteTableOddCol-clear" colspan="1" style="border-collapse:collapse; width:23px; border:1px solid transparent">
<br>
</td>
<td class="ms-rteTableEvenCol-clear" style="border-collapse:collapse; width:188px; border:1px solid transparent" align="right">
<img class="EmojiInsert" src="cid:48dd5d09-2423-4383-9dc5-7c7fde94b159"><br>
</td>
</tr>
<tr class="ms-rteTableOddRow-clear" style="border-collapse:collapse; border:1px solid transparent; background-color:rgba(255,255,255,0.85)">
<td class="ms-rteTableEvenCol-clear" style="border-collapse:collapse; border:1px solid transparent">
<br>
</td>
<td class="ms-rteTableOddCol-clear" colspan="1" style="border-collapse:collapse; border:1px solid transparent">
<br>
</td>
<td class="ms-rteTableEvenCol-clear" style="border-collapse:collapse; border:1px solid transparent">
<br>
</td>
</tr>
<tr class="ms-rteTableEvenRow-clear" style="border-collapse:collapse; border:1px solid transparent; background-color:rgba(255,255,255,0.85)">
<td class="ms-rteTableEvenCol-clear" style="border-collapse:collapse; border:1px solid transparent">
<div><span style="color:rgb(117,123,128)">THALES SERVICES SAS</span><br>
<span style="color:rgb(117,123,128)">44 Quai Charles de Gaulle</span><br>
<span style="color:rgb(117,123,128)">CS 20100</span><br>
<span style="color:rgb(117,123,128)">69463 Lyon Cedex 06</span></div>
</td>
<td class="ms-rteTableOddCol-clear" colspan="1" style="border-collapse:collapse; border:1px solid transparent">
<br>
</td>
<td class="ms-rteTableEvenCol-clear" style="border-collapse:collapse; border:1px solid transparent">
<br>
</td>
</tr>
</tbody>
</table>
<span style="font-size:8pt; color:rgb(117,123,128)">--------------------------------------------------<br>
<a href="http://www.thalesgroup.com" class="OWAAutoLink" id="LPNoLP">www.thalesgroup.com</a><br>
</span><i></i>
<p></p>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De :</b> midPoint <midpoint-bounces@lists.evolveum.com> de la part de Sylvaire kevin TIPA <sylvaire-kevin.tipa@mythalesgroup.io><br>
<b>Envoyé :</b> mardi 17 avril 2018 08:24:54<br>
<b>À :</b> midpoint@lists.evolveum.com<br>
<b>Objet :</b> [midPoint] Use CSV for validate user</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<table id="msexchangesafetytips;6683cc74-bab4-4b82-1509-08d5a42c9b9c;R:fr-FR" border="0" cellspacing="0" cellpadding="0" width="100%" align="left" style="border:0; display:table; width:100%; table-layout:fixed; border-collapse:seperate; float:none">
<tbody>
<tr>
<td valign="middle" width="1px" bgcolor="#910A19" cellpadding="7px 2px 7px 2px" style="padding:7px 2px 7px 2px; background-color:#910A19">
</td>
<td valign="middle" width="100%" bgcolor="#FDF2F4" cellpadding="7px 5px 7px 15px" color="#212121" style="width:100%; background-color:#FDF2F4; padding:7px 5px 7px 15px; font-family:wf_segoe-ui_normal,Segoe UI,Segoe WP,Tahoma,Arial,sans-serif; font-size:12px; font-weight:normal; color:#212121; text-align:left; word-wrap:break-word">
<div>Cet expéditeur n’a pas passé les vérifications relatives à la détection des fraudes et n’est peut-être pas la personne qu’il prétend être. En savoir plus sur l’<a href="http://aka.ms/LearnAboutSpoofing"> usurpation d’identités</a></div>
</td>
<td valign="middle" align="left" width="75px" bgcolor="#FDF2F4" cellpadding="7px 5px 7px 5px" color="#212121" style="width:75px; background-color:#FDF2F4; padding:7px 5px 7px 5px; font-family:wf_segoe-ui_normal,Segoe UI,Segoe WP,Tahoma,Arial,sans-serif; font-size:12px; font-weight:normal; color:#212121; text-align:left; word-wrap:break-word">
<a href="http://aka.ms/SafetyTipsFeedback">Votre avis</a></td>
</tr>
</tbody>
</table>
<div>
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p style="margin-top:0; margin-bottom:0">Hey all,</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">I want to use a CSV file from my RH system for validate user creation un self registry. For reason, I don't want to import all account by I want to let use create her account, and check if it's present in my file.
<br>
</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">So I have imported my CSV file as resource via CSV connector. But how I can use it as check ? I start to make this job in user hook with the following process :
<br>
- Check if name exist <br>
- if yes, continue <br>
- if not, sent notification to company admin for check and update the csv file <br>
<br>
I have few problem :<br>
- How I can browse the resource in java ? <br>
- I can make a query on shadow, but it seems that all the shadow are not load until I browse the resource with gui ..
<br>
  - So, How I can load all the account in shadow item with connect it to account ... 
<br>
</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Other idea ?</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">th, br<br>
</p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<br>
<p style="margin-top:0; margin-bottom:0">Cordialement. </p>
<table class="x_MsoNormalTable" width="100%" cellspacing="0" cellpadding="0" border="1" style="width:100.0%; border:none; border-top:solid #00BBDF 3.0pt">
<tbody>
<tr>
<td valign="top" style="border:medium none; padding:0cm; width:301px"></td>
</tr>
</tbody>
</table>
<table class="x_ms-rteTable-clear" cellspacing="0" style="border-collapse:collapse; table-layout:fixed; border:1px solid transparent">
<tbody>
<tr class="x_ms-rteTableEvenRow-clear" style="border-collapse:collapse; border:1px solid transparent; background-color:rgba(255,255,255,0.85)">
<td class="x_ms-rteTableEvenCol-clear" style="border-collapse:collapse; width:208px; border:1px solid transparent">
<b><span style="background-color:rgb(255,255,255); color:rgb(0,111,201)">Sylvaire-Kevin TIPA</span></b><br>
<div><i><span style="font-size:10pt; color:rgb(117,123,128)">Thales Services / OIC INFRAS</span><br>
</i><span style="font-size:10pt; color:rgb(117,123,128)"><i>Devops Infrastructure Automation</i></span></div>
</td>
<td class="x_ms-rteTableOddCol-clear" colspan="1" style="border-collapse:collapse; width:23px; border:1px solid transparent">
<br>
</td>
<td class="x_ms-rteTableEvenCol-clear" align="right" style="border-collapse:collapse; width:188px; border:1px solid transparent">
<img class="x_EmojiInsert" src="cid:9c0d85e5-a0d2-4bf9-b80e-e17a720af405"><br>
</td>
</tr>
<tr class="x_ms-rteTableOddRow-clear" style="border-collapse:collapse; border:1px solid transparent; background-color:rgba(255,255,255,0.85)">
<td class="x_ms-rteTableEvenCol-clear" style="border-collapse:collapse; border:1px solid transparent">
<br>
</td>
<td class="x_ms-rteTableOddCol-clear" colspan="1" style="border-collapse:collapse; border:1px solid transparent">
<br>
</td>
<td class="x_ms-rteTableEvenCol-clear" style="border-collapse:collapse; border:1px solid transparent">
<br>
</td>
</tr>
<tr class="x_ms-rteTableEvenRow-clear" style="border-collapse:collapse; border:1px solid transparent; background-color:rgba(255,255,255,0.85)">
<td class="x_ms-rteTableEvenCol-clear" style="border-collapse:collapse; border:1px solid transparent">
<div><span style="color:rgb(117,123,128)">THALES SERVICES SAS</span><br>
<span style="color:rgb(117,123,128)">44 Quai Charles de Gaulle</span><br>
<span style="color:rgb(117,123,128)">CS 20100</span><br>
<span style="color:rgb(117,123,128)">69463 Lyon Cedex 06</span></div>
</td>
<td class="x_ms-rteTableOddCol-clear" colspan="1" style="border-collapse:collapse; border:1px solid transparent">
<br>
</td>
<td class="x_ms-rteTableEvenCol-clear" style="border-collapse:collapse; border:1px solid transparent">
<br>
</td>
</tr>
</tbody>
</table>
<span style="font-size:8pt; color:rgb(117,123,128)">--------------------------------------------------<br>
<a href="http://www.thalesgroup.com" class="x_OWAAutoLink" id="LPNoLP">www.thalesgroup.com</a><br>
</span><i></i>
<p></p>
</div>
</div>
</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>
</div>
</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>
</body>
</html>