<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><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:Ubuntu;
panose-1:2 11 5 4 3 6 2 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.DefaultFontHxMailStyle
{mso-style-name:"Default Font HxMail Style";
font-family:"Ubuntu",sans-serif;
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-US><div class=WordSection1><p class=MsoNormal><span class=DefaultFontHxMailStyle>For anyone else that went from 2008 R2 to 2016/2019 , I just noticed a new attribute, looks like it was added in 2012R2, <o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle>msDS-parentdistname<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle>This attribute contains the objects current org unit. Finally, no more <script> code in midpoint to get the parent org unit for inbound sync.<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle>So this mess on inbound sync from distinguishedName,<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle><code><o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> tmpdn = basic.uc(input);<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> cn = tmpdn.substring(tmpdn.indexOf(",CN=") + 1);<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> ou = tmpdn.substring(tmpdn.indexOf(",OU=") + 1);<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> if (tmpdn.contains(",CN=")) {<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> log.info("-- DN Path " + cn + "is an AD container");<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> return basic.uc(cn);<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> }<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> if (tmpdn.contains(",OU=") && !tmpdn.contains(",CN=")) {<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> log.info("-- DN Path " + ou + "is a org unit");<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> return basic.uc(ou);<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> }<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle></code><o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle>Is now a simple attribute on its own and becomes<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> <attribute><o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> <c:ref>ri:msDS-parentdistname</c:ref><o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> <inbound><o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> <target><o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> <c:path>$focus/extension/bshp:adPath</c:path><o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> </target><o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> </inbound><o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle> </attribute><o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p></div></body></html>