<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Andrea,</p>
<p>can you try searching by that extension attribute in midPoint
using Query playground?</p>
<p>Ivan<br>
</p>
<div class="moz-cite-prefix">On 25. 9. 2020 9:44, Andrea Picconi via
midPoint wrote:<br>
</div>
<blockquote type="cite"
cite="mid:AM0PR09MB377805DDD60D8D72DE841430F7360@AM0PR09MB3778.eurprd09.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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;}
@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;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"Preformattato HTML Carattere";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-language:IT;}
span.PreformattatoHTMLCarattere
{mso-style-name:"Preformattato HTML Carattere";
mso-style-priority:99;
mso-style-link:"Preformattato HTML";
font-family:Consolas;
mso-fareast-language:EN-US;}
span.StileMessaggioDiPostaElettronica22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
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">Hi again,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I also tried <a
id="OWAAM42C02E2EB7A74F4D83F8D648CAF1579E"
href="mailto:kromhout@unc.edu" moz-do-not-send="true">
<span
style="font-family:"Calibri",sans-serif;text-decoration:none">@Ethan
Kromhout</span></a>’s example, but it still gives me the
two errors I showed you in the previous mail.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I probably did something
wrong in the setting, below how I set it all up:<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">this is my
extension_user_field schema namespace:<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"><xsd:schema
elementFormDefault=<i>"qualified"</i><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
targetNamespace=<i><a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">"http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"</a></i><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> xmlns:tns=<i><a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">"http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"</a></i><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> xmlns:a=<i><a class="moz-txt-link-rfc2396E" href="http://prism.evolveum.com/xml/ns/public/annotation-3">"http://prism.evolveum.com/xml/ns/public/annotation-3"</a></i><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> xmlns:c=<i><a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a></i><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> xmlns:xsd=<i><a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a></i>><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">here the indexed
attribute:<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"><xsd:element name=<i>"uidLDAP"</i>
type=<i>"xsd:string"</i> minOccurs=<i>"0"</i> maxOccurs=<i>"1"</i>><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<xsd:annotation><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<xsd:appinfo><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<a:indexed>true</a:indexed><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<a:displayName>LDAP UID</a:displayName><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<a:displayOrder>550</a:displayOrder><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<a:help>UID from LDAP</a:help><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
</xsd:appinfo><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
</xsd:annotation><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
</xsd:element><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">here instead the
correlation that I have tried, starting from what you have
seen above:<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"><correlation><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <q:equal><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <q:path
xmlns:ri=<a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">"http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"</a>>extension/uidLDAP</q:path><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<expression><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <path
xmlns:ri=<a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">"http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"</a>><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> declare
namespace
ri=<a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">"http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"</a>;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
$projection/attributes/ri:sAMAccountName<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
</path><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
</expression><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </q:equal><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"></correlation><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">Could you tell me where
I'm wrong?<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">Thank you,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Andrea<o:p></o:p></span></p>
<p class="MsoNormal"><span 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
style="mso-fareast-language:IT" lang="EN-US">From:</span></b><span
style="mso-fareast-language:IT" 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>Ethan Kromhout via midPoint<br>
<b>Sent:</b> Wednesday, September 23, 2020 3:12 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a><br>
<b>Cc:</b> Ethan Kromhout <a class="moz-txt-link-rfc2396E" href="mailto:kromhout@unc.edu"><kromhout@unc.edu></a><br>
<b>Subject:</b> Re: [midPoint] Problem with correlation
and external attribute<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p>I have used an extension attribute in a similar way, though
it wasn't with AD. In my case I explicitly called out the
namespace of the custom schema, not sure if that was required,
but it works okay. Do note that the custom attribute must be
indexed.<span style="mso-fareast-language:IT"><o:p></o:p></span></p>
<p>In my schema I have the namespace and indexed attribute, note
the "targetNamespace":<o:p></o:p></p>
<p><?xml version="1.0" encoding="UTF-8" standalone="yes"?><br>
<xsd:schema elementFormDefault="qualified"<br>
targetNamespace=<a
href="http://unc.edu/xml/ns/uncPerson"
moz-do-not-send="true">"http://unc.edu/xml/ns/uncPerson"</a><br>
xmlns:tns=<a
href="http://example.com/xml/ns/mySchema"
moz-do-not-send="true">"http://example.com/xml/ns/mySchema"</a><br>
xmlns:a=<a
href="http://prism.evolveum.com/xml/ns/public/annotation-3"
moz-do-not-send="true">"http://prism.evolveum.com/xml/ns/public/annotation-3"</a><br>
xmlns:c=<a
href="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
moz-do-not-send="true">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a><br>
xmlns:xsd=<a
href="http://www.w3.org/2001/XMLSchema"
moz-do-not-send="true">"http://www.w3.org/2001/XMLSchema"</a>><o:p></o:p></p>
<p style="margin-bottom:12.0pt"> <xsd:element name="subId"
type="xsd:string" minOccurs="0" maxOccurs="1"><br>
<xsd:annotation><br>
<xsd:appinfo><br>
<a:indexed>true</a:indexed><br>
<a:displayName>subId</a:displayName><br>
<a:help>Subject
ID</a:help><br>
<a:displayOrder>150</a:displayOrder><br>
</xsd:appinfo><br>
</xsd:annotation><br>
</xsd:element><o:p></o:p></p>
<p>Then in the correlation I reference that namespace as
uncPerson:<o:p></o:p></p>
<p><correlation><br>
<q:equal><br>
<q:path xmlns:uncPerson=<a
href="http://unc.edu/xml/ns/uncPerson"
moz-do-not-send="true">"http://unc.edu/xml/ns/uncPerson"</a>>extension/uncPerson:subId</q:path><br>
<expression><br>
<path xmlns:ri=<a
href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
moz-do-not-send="true">"http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"</a>><br>
declare namespace ri=<a
href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
moz-do-not-send="true">"http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"</a>;<br>
$account/attributes/ri:pid<br>
</path><br>
</expression><br>
</q:equal><br>
</correlation><o:p></o:p></p>
<p>Ethan<o:p></o:p></p>
<div>
<p class="MsoNormal">On 9/23/20 8:55 AM, Andrea Picconi via
midPoint wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">I have a problem for
which I have searched for a solution everywhere, but I
couldn’t find anything: I am making a correlation between
an extended attribute present in the user in midpoint (<b><i>uidLDAP</i></b>)
and the
<b><i>sAMAccountName</i></b> attribute of an AD account
that I need to import.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">below, you can see one
of the tests made (of the many)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><img
style="width:7.8958in;height:1.375in" id="_x0000_i1049"
src="cid:part10.E9823F63.B29FBDEE@evolveum.com" class=""
width="758" height="132" border="0"><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">but this does not give
me any errors, it just tells me that the correlation has
reported an unmatched:</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><img style="width:3.25in;height:.6458in"
id="_x0000_i1050"
src="cid:part11.0B7390B3.78487293@evolveum.com" class=""
width="312" height="62" border="0"> <img
style="width:4.7395in;height:1.2291in" id="_x0000_i1051"
src="cid:part12.3F65C6A3.A350462A@evolveum.com" class=""
width="455" height="118" border="0"><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">But if I try to force
the correlation by choosing the "change owner" option and
going to grab the correct user by hand in midpoint, it
works</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><img style="width:3.427in;height:2.552in"
id="_x0000_i1052"
src="cid:part13.ED64914B.BBB7458E@evolveum.com" class=""
width="329" height="245" border="0"><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">So i think the problem
comes from the attribute path on midpoint (the extended
one):</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><img
style="width:7.2916in;height:.2395in" id="_x0000_i1053"
src="cid:part14.FECC6569.4C2EA7D4@evolveum.com" class=""
width="700" height="23" border="0"><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Has anyone already
tried to use an extended attribute in the first
correlation path?</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Could you help me?</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Thank you and regards,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><b><span
style="font-size:10.0pt;mso-fareast-language:IT">Andrea
Picconi</span></b><o:p></o:p></p>
<p class="MsoNormal"><i><span
style="font-size:10.0pt;mso-fareast-language:IT">IAM
(Identity Access Management)</span></i><span
style="font-size:10.0pt;mso-fareast-language:IT"><br>
<br>
<br>
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:IT"
lang="EN-US"><img style="width:1.4166in;height:.3437in"
id="_x0000_i1054"
src="cid:part15.F20C8D97.F6FC7A84@evolveum.com"
alt="Innovery" class="" width="136" height="33"
border="0"></span><span
style="font-size:10.0pt;mso-fareast-language:IT"><br>
Skype: precons</span><span style="mso-fareast-language:IT"><br>
</span><span
style="font-size:10.0pt;mso-fareast-language:IT">T: +39
06 51963439 (int. 196) <br>
</span><span
style="font-size:12.0pt;mso-fareast-language:IT"><br>
</span><span
style="font-size:10.0pt;color:black;mso-fareast-language:IT">Strada
Quattro Palazzina A6 c/o Centro Direzionale Milanofiori,
20057 Assago (MI).<br>
</span><span
style="font-size:10.0pt;mso-fareast-language:IT"><a
href="http://www.innovery.net/" moz-do-not-send="true"><span
style="color:#0563C1">www.innovery.net</span></a> |
T: +39 06 519 63 439</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:IT"><br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>midPoint mailing list<o:p></o:p></pre>
<pre><a href="mailto:midPoint@lists.evolveum.com" moz-do-not-send="true">midPoint@lists.evolveum.com</a><o:p></o:p></pre>
<pre><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></pre>
</blockquote>
</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>