<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Al,</p>
<p>while $focus is better to use than $user (because $user is
deprecated and will stop work sooner or later), there is also
shorter form that can be used in paths in mappings: you can omit
the $focus (or $user) part entirely. It is because the default
context of those mappings is focus object.<br>
</p>
<p>Examples:</p>
<p> <inbound><br>
<target><br>
<path><b>employeeNumber</b></path>
<!-- $focus/employeeNumber --><br>
</target><br>
</inbound><br>
</p>
<p>or</p>
<p><br>
</p>
<p> <attribute><br>
<ref>ri:empStatus</ref><br>
<displayName>Employee
Status</displayName><br>
<inbound><br>
<target><br>
<path><b>extension/empStatus</b></path>
<!-- $focus/extension/empStatus --><br>
</target><br>
</inbound><br>
</attribute><br>
</p>
<p><br>
</p>
<p>or</p>
<p> <attribute><br>
<ref>ri:cardNumber</ref><br>
<displayName>Meal Card
Number</displayName><br>
<outbound><br>
<source><br>
<path><b>extension/mealCardNumber</b></path>
<!-- $focus/extension/mealCardNumber --><br>
</source><br>
</outbound><br>
</attribute><br>
<br>
</p>
<p>But using $focus is perfectly OK.</p>
<p>Best regards,</p>
<p>Ivan</p>
<div class="moz-cite-prefix">On 23. 11. 2020 16:21, Al Lilianstrom
via midPoint wrote:<br>
</div>
<blockquote type="cite"
cite="mid:SA0PR09MB708391D027A44E6732BD42EEB1FC0@SA0PR09MB7083.namprd09.prod.outlook.com">
<pre class="moz-quote-pre" wrap="">Hi Daniel,
I had seen that $user was deprecated. The examples I had been trying were using $user so I did for consistency. Going forward I'm using $focus
al
--
Al Lilianstrom
Authentication Services
Fermi National Accelerator Laboratory
<a class="moz-txt-link-abbreviated" href="http://www.fnal.gov">www.fnal.gov</a>
<a class="moz-txt-link-abbreviated" href="mailto:lilstrom@fnal.gov">lilstrom@fnal.gov</a>
________________________________________
From: Macias, Daniel <a class="moz-txt-link-rfc2396E" href="mailto:Daniel.Macias@carecentrix.com"><Daniel.Macias@carecentrix.com></a>
Sent: Monday, November 23, 2020 8:38 AM
To: midPoint General Discussion
Cc: Al Lilianstrom
Subject: RE: [midPoint] New to midPoint - questions
Hi Al,
Since you are running 4.2, you can try;
$focus/extension/[attributeName]
With the latest versions, $user was changed to $focus.
--
Daniel.
-----Original Message-----
From: midPoint [<a class="moz-txt-link-freetext" href="mailto:midpoint-bounces@lists.evolveum.com">mailto:midpoint-bounces@lists.evolveum.com</a>] On Behalf Of Al Lilianstrom via midPoint
Sent: Monday, November 23, 2020 8:17 AM
To: midPoint General Discussion <a class="moz-txt-link-rfc2396E" href="mailto:midpoint@lists.evolveum.com"><midpoint@lists.evolveum.com></a>
Cc: Al Lilianstrom <a class="moz-txt-link-rfc2396E" href="mailto:lilstrom@fnal.gov"><lilstrom@fnal.gov></a>
Subject: **EXTERNAL EMAIL** Re: [midPoint] New to midPoint - questions
CAUTION: EXTERNAL EMAIL Do not click on links or open any attachments unless you recognize the sender and know the contents are safe. Think before you click! If you think this message is suspicious in nature, please report it as phishing.
--------------------------------------------------------------------------------------------------------------------------------------------
Thanks Davy - that was simple.
Now that I know what I was looking for in the manual it makes sense.
Thanks again
al
--
Al Lilianstrom
Authentication Services
Fermi National Accelerator Laboratory
<a class="moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fnal.gov&d=DwIGaQ&c=M_MsNIkt6d35T82-LwTepdlQ9Auzkv7QS0Z61HVFy-o&r=g7uGuAbRiyUbGD0n2ruBWxi-mArzn5YyP_TobFaeBfQ&m=rTIFxxH27mP4Ou79cVMrPcptZgr7P0ARUxVpt-lU6b4&s=eQ-4aiWSXgPnTO-jH5AuC9mpdQVzRVFyISWiARI9jD0&e=">https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fnal.gov&d=DwIGaQ&c=M_MsNIkt6d35T82-LwTepdlQ9Auzkv7QS0Z61HVFy-o&r=g7uGuAbRiyUbGD0n2ruBWxi-mArzn5YyP_TobFaeBfQ&m=rTIFxxH27mP4Ou79cVMrPcptZgr7P0ARUxVpt-lU6b4&s=eQ-4aiWSXgPnTO-jH5AuC9mpdQVzRVFyISWiARI9jD0&e=</a>
<a class="moz-txt-link-abbreviated" href="mailto:lilstrom@fnal.gov">lilstrom@fnal.gov</a>
________________________________________
From: Davy Priem <a class="moz-txt-link-rfc2396E" href="mailto:davy.priem@vives.be"><davy.priem@vives.be></a>
Sent: Friday, November 20, 2020 3:25 PM
To: midPoint General Discussion
Cc: Al Lilianstrom
Subject: Re: [midPoint] New to midPoint - questions
Hi,
You should use:
<target>
<path>$user/extension/emailAddresses</path>
</target>
Davy Priem
Op 20 nov. 2020, om 22:07 heeft Al Lilianstrom via midPoint <<a class="moz-txt-link-abbreviated" href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a><a class="moz-txt-link-rfc2396E" href="mailto:midpoint@lists.evolveum.com"><mailto:midpoint@lists.evolveum.com></a>> het volgende geschreven:
Hi,
We're taking a close look at midPoint to replace our collection of Perl and PowerShells scripts. I've been working my way through the book getting my 4.2 system reading off a CSV from our HR system and getting it connected to one of my Active Directory domains. Thanks to the wiki and the docs for the examples. CSV input is creating accounts in midPoint. I can see the AD accounts in the connector. I've also done a schema extension to better match the data from HR. So far, so good.
First question. The schema extension is simple (see below the signature). I'm able to manually edit the badgeNumber in the GUI. When I try and write to it from the CSV I get
Cannot determine definition for 'badgeNumber' from user
The inbound rule looks like so
<target>
<c:path>$user/badgeNumber</c:path>
</target>
If I manually edit the entry, add a badgeNumber, save, and then look at the entry in raw mode I see
<extension xmlns:gen497="<a class="moz-txt-link-freetext" href="http://midpoint.evolveum.com/xml/ns/samples/extension-3">http://midpoint.evolveum.com/xml/ns/samples/extension-3</a><a class="moz-txt-link-rfc2396E" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__midpoint.evolveum.com_xml_ns_samples_extension-2D3&d=DwMFAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=Ccoy53oEM8wW3-vUAuZFE1kez-3vbV9LOfLVoaEsm3A&m=klDyOGDY_ZnPj3ZW7E3ZimaAgo2XshlrMzIrWNbndNU&s=_fhDRWIa08IEMtICqyd7zbZax9UmNex6T3x9EJ0Cg1o&e="><https://urldefense.proofpoint.com/v2/url?u=http-3A__midpoint.evolveum.com_xml_ns_samples_extension-2D3&d=DwMFAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=Ccoy53oEM8wW3-vUAuZFE1kez-3vbV9LOfLVoaEsm3A&m=klDyOGDY_ZnPj3ZW7E3ZimaAgo2XshlrMzIrWNbndNU&s=_fhDRWIa08IEMtICqyd7zbZax9UmNex6T3x9EJ0Cg1o&e=></a>">
<gen497:badgeNumber>012345</gen497:badgeNumber>
</extension>
Based on this I changed the target to
<target>
<extension xmlns:gen497="<a class="moz-txt-link-freetext" href="http://midpoint.evolveum.com/xml/ns/samples/extension-3">http://midpoint.evolveum.com/xml/ns/samples/extension-3</a><a class="moz-txt-link-rfc2396E" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__midpoint.evolveum.com_xml_ns_samples_extension-2D3&d=DwMFAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=Ccoy53oEM8wW3-vUAuZFE1kez-3vbV9LOfLVoaEsm3A&m=klDyOGDY_ZnPj3ZW7E3ZimaAgo2XshlrMzIrWNbndNU&s=_fhDRWIa08IEMtICqyd7zbZax9UmNex6T3x9EJ0Cg1o&e="><https://urldefense.proofpoint.com/v2/url?u=http-3A__midpoint.evolveum.com_xml_ns_samples_extension-2D3&d=DwMFAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=Ccoy53oEM8wW3-vUAuZFE1kez-3vbV9LOfLVoaEsm3A&m=klDyOGDY_ZnPj3ZW7E3ZimaAgo2XshlrMzIrWNbndNU&s=_fhDRWIa08IEMtICqyd7zbZax9UmNex6T3x9EJ0Cg1o&e=></a>">
<c:path>$user/gen497:badgeNumber</c:path>
</extension>
</target>
Which gives a
No field 'extension' in class class com.evolveum.midpoint.xml.ns._public.common.common_3.VariableBindingDefinitionType
when saving the XML file.
I haven't been able to find any guidance on writing to these extended attributes so I'd appreciate any guidance.
thanks, al
--
Al Lilianstrom
Authentication Services
Fermi National Accelerator Laboratory
<a class="moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fnal.gov&d=DwIGaQ&c=M_MsNIkt6d35T82-LwTepdlQ9Auzkv7QS0Z61HVFy-o&r=g7uGuAbRiyUbGD0n2ruBWxi-mArzn5YyP_TobFaeBfQ&m=rTIFxxH27mP4Ou79cVMrPcptZgr7P0ARUxVpt-lU6b4&s=eQ-4aiWSXgPnTO-jH5AuC9mpdQVzRVFyISWiARI9jD0&e=">https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fnal.gov&d=DwIGaQ&c=M_MsNIkt6d35T82-LwTepdlQ9Auzkv7QS0Z61HVFy-o&r=g7uGuAbRiyUbGD0n2ruBWxi-mArzn5YyP_TobFaeBfQ&m=rTIFxxH27mP4Ou79cVMrPcptZgr7P0ARUxVpt-lU6b4&s=eQ-4aiWSXgPnTO-jH5AuC9mpdQVzRVFyISWiARI9jD0&e=</a><a class="moz-txt-link-rfc2396E" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fnal.gov&d=DwIGaQ&c=M_MsNIkt6d35T82-LwTepdlQ9Auzkv7QS0Z61HVFy-o&r=g7uGuAbRiyUbGD0n2ruBWxi-mArzn5YyP_TobFaeBfQ&m=rTIFxxH27mP4Ou79cVMrPcptZgr7P0ARUxVpt-lU6b4&s=eQ-4aiWSXgPnTO-jH5AuC9mpdQVzRVFyISWiARI9jD0&e="><https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fnal.gov&d=DwIGaQ&c=M_MsNIkt6d35T82-LwTepdlQ9Auzkv7QS0Z61HVFy-o&r=g7uGuAbRiyUbGD0n2ruBWxi-mArzn5YyP_TobFaeBfQ&m=rTIFxxH27mP4Ou79cVMrPcptZgr7P0ARUxVpt-lU6b4&s=eQ-4aiWSXgPnTO-jH5AuC9mpdQVzRVFyISWiARI9jD0&e=></a>
<a class="moz-txt-link-abbreviated" href="mailto:lilstrom@fnal.gov">lilstrom@fnal.gov</a>
# cat /opt/midpoint/midpoint-4.2/var/schema/schema-extensions.xsd
<xsd:schema elementFormDefault="qualified"
targetNamespace=<a class="moz-txt-link-rfc2396E" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__midpoint.evolveum.com_xml_ns_samples_extension-2D3&d=DwIGaQ&c=M_MsNIkt6d35T82-LwTepdlQ9Auzkv7QS0Z61HVFy-o&r=g7uGuAbRiyUbGD0n2ruBWxi-mArzn5YyP_TobFaeBfQ&m=rTIFxxH27mP4Ou79cVMrPcptZgr7P0ARUxVpt-lU6b4&s=VBcdggsdMjpv65GCL6mrNaDt-GuNvTu1_3dmvegBnNc&e=">"https://urldefense.proofpoint.com/v2/url?u=http-3A__midpoint.evolveum.com_xml_ns_samples_extension-2D3&d=DwIGaQ&c=M_MsNIkt6d35T82-LwTepdlQ9Auzkv7QS0Z61HVFy-o&r=g7uGuAbRiyUbGD0n2ruBWxi-mArzn5YyP_TobFaeBfQ&m=rTIFxxH27mP4Ou79cVMrPcptZgr7P0ARUxVpt-lU6b4&s=VBcdggsdMjpv65GCL6mrNaDt-GuNvTu1_3dmvegBnNc&e="</a><a class="moz-txt-link-rfc2396E" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__midpoint.evolveum.com_xml_ns_samples_extension-2D3-2522&d=DwQFAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=Ccoy53oEM8wW3-vUAuZFE1kez-3vbV9LOfLVoaEsm3A&m=klDyOGDY_ZnPj3ZW7E3ZimaAgo2XshlrMzIrWNbndNU&s=Jo814lFyascCnS6o9Ubc0fNzZqmmJFnnCBW4twWBQ1c&e="><https://urldefense.proofpoint.com/v2/url?u=http-3A__midpoint.evolveum.com_xml_ns_samples_extension-2D3-2522&d=DwQFAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=Ccoy53oEM8wW3-vUAuZFE1kez-3vbV9LOfLVoaEsm3A&m=klDyOGDY_ZnPj3ZW7E3ZimaAgo2XshlrMzIrWNbndNU&s=Jo814lFyascCnS6o9Ubc0fNzZqmmJFnnCBW4twWBQ1c&e=></a>
xmlns:tns=<a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/samples/extension-3">"http://midpoint.evolveum.com/xml/ns/samples/extension-3"</a>
xmlns:a=<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>
xmlns:c=<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>
xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>>
<xsd:complexType name="UserTypeExtensionType">
<xsd:annotation>
<xsd:appinfo>
<a:extension ref="c:UserType"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="badgeNumber" type="xsd:string" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:appinfo>
<a:displayName>Badge Number</a:displayName>
<a:help>
This is the number that is on your badge
</a:help>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
_______________________________________________
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://urldefense.proofpoint.com/v2/url?u=https-3A__lists.evolveum.com_mailman_listinfo_midpoint&d=DwIGaQ&c=M_MsNIkt6d35T82-LwTepdlQ9Auzkv7QS0Z61HVFy-o&r=g7uGuAbRiyUbGD0n2ruBWxi-mArzn5YyP_TobFaeBfQ&m=rTIFxxH27mP4Ou79cVMrPcptZgr7P0ARUxVpt-lU6b4&s=85ZXLHcbzgtP7AOkqXfavVSnwXIqsFHoHJGqne8QYgA&e=">https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.evolveum.com_mailman_listinfo_midpoint&d=DwIGaQ&c=M_MsNIkt6d35T82-LwTepdlQ9Auzkv7QS0Z61HVFy-o&r=g7uGuAbRiyUbGD0n2ruBWxi-mArzn5YyP_TobFaeBfQ&m=rTIFxxH27mP4Ou79cVMrPcptZgr7P0ARUxVpt-lU6b4&s=85ZXLHcbzgtP7AOkqXfavVSnwXIqsFHoHJGqne8QYgA&e=</a><a class="moz-txt-link-rfc2396E" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.evolveum.com_mailman_listinfo_midpoint&d=DwQFAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=Ccoy53oEM8wW3-vUAuZFE1kez-3vbV9LOfLVoaEsm3A&m=klDyOGDY_ZnPj3ZW7E3ZimaAgo2XshlrMzIrWNbndNU&s=pm-9jZqhQoDEd6okMIaJ3CQ2Eb0UCzERnx28qLZpTnU&e="><https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.evolveum.com_mailman_listinfo_midpoint&d=DwQFAg&c=gRgGjJ3BkIsb5y6s49QqsA&r=Ccoy53oEM8wW3-vUAuZFE1kez-3vbV9LOfLVoaEsm3A&m=klDyOGDY_ZnPj3ZW7E3ZimaAgo2XshlrMzIrWNbndNU&s=pm-9jZqhQoDEd6okMIaJ3CQ2Eb0UCzERnx28qLZpTnU&e=></a>
_______________________________________________
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://urldefense.proofpoint.com/v2/url?u=https-3A__lists.evolveum.com_mailman_listinfo_midpoint&d=DwIGaQ&c=M_MsNIkt6d35T82-LwTepdlQ9Auzkv7QS0Z61HVFy-o&r=g7uGuAbRiyUbGD0n2ruBWxi-mArzn5YyP_TobFaeBfQ&m=rTIFxxH27mP4Ou79cVMrPcptZgr7P0ARUxVpt-lU6b4&s=85ZXLHcbzgtP7AOkqXfavVSnwXIqsFHoHJGqne8QYgA&e=">https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.evolveum.com_mailman_listinfo_midpoint&d=DwIGaQ&c=M_MsNIkt6d35T82-LwTepdlQ9Auzkv7QS0Z61HVFy-o&r=g7uGuAbRiyUbGD0n2ruBWxi-mArzn5YyP_TobFaeBfQ&m=rTIFxxH27mP4Ou79cVMrPcptZgr7P0ARUxVpt-lU6b4&s=85ZXLHcbzgtP7AOkqXfavVSnwXIqsFHoHJGqne8QYgA&e=</a>
________________________________
This communication is intended only for the use of the individual or entity named as the addressee. It may contain information that is privileged and/or confidential under applicable law. If you are not the intended recipient or such recipient's employee or agent, you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited. If you have received this communication in error, please immediately notify CareCentrix Compliance Hot Line at (877) 848-8229 and notify the sender by electronic mail. Please delete this communication without making any copies. Thank you for your cooperation.
_______________________________________________
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>