<html xmlns:v="urn:schemas-microsoft-com:vml" 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:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Courier New";
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal-compose;
        font-family:"Courier New";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">For one of our third-party vendors, they are looking for a partial of what we are currently populating in AD for the employeeNumber field. Basically I’m looking at pulling in a substring of the last
nine integers in the field. Below is the script I’ve put together but it looks like my syntaxing needs some work.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> <resolver:AttributeDefinition xsi:type="Script" xmlns="urn:mace:shibboleth:2.0:resolver:ad" id="CampusID" sourceAttributeID="employeeNumber"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> <resolver:Dependency ref="myLDAP" /><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="urn:oid:2.16.840.1.113730.3.1.3" friendlyName="CampusID" /><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> <Script><![CDATA[
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> importPackage(Packages.org.slf4j);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-family:"Courier New""> CampusID = new BasicAttribute("CampusID");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> CampusID.getValues().add(requestContext.getPrincipalName());
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> CampusID = CampusID.SubString(6,9);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> ]]><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> </Script><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> </resolver:AttributeDefinition><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Any idea what I’m missing?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><br>
~Patrick<o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>