<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;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
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="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">The problem is your map is evaluating every value of eduPersonAffiliation. Any chance you could do what you’re hoping with something single-valued like eduPersonPrimaryAffiliation?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Shy of that, I think your best bet is a script. Set the attribute to 0 at the beginning. Then iterate over all values of eduPersonAffiliation in a for loop. If you find “student”, change that variable to 1. Should be a pretty simple script.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Keith<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> users <users-bounces@shibboleth.net> <b>On Behalf Of
</b>Mohamed Lrhazi via users<br>
<b>Sent:</b> Thursday, August 18, 2022 6:26 PM<br>
<b>To:</b> Shib Users <users@shibboleth.net><br>
<b>Cc:</b> Mohamed Lrhazi <lrhazi@cua.edu><br>
<b>Subject:</b> Help with MappedAttributeDefinition<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hello,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I am trying to add an attribute that resolves to "1" if the user is a student, but "0" otherwise... I thought it would be as simple as below.... but this actually returns "1" and "0" if the user is both a student and also a member or any
other affiliation....<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">How do I implement this logic? <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks a lot!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Mohamed.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> </span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777"><</span><span style="font-size:9.0pt;font-family:"Courier New";color:#4B69C6">AttributeDefinition</span><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">
</span><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">id</span></i><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">=</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#448C27">isEligible</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">
</span><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">xsi</span></i><i><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">:</span></i><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">type</span></i><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">=</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#448C27">Mapped</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"></span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777"><</span><span style="font-size:9.0pt;font-family:"Courier New";color:#4B69C6">InputDataConnector</span><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">
</span><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">ref</span></i><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">=</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#448C27">sqliteConnector</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">
</span><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">attributeNames</span></i><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">=</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#448C27">eduPersonAffiliation</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"/></span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777"><</span><span style="font-size:9.0pt;font-family:"Courier New";color:#4B69C6">DefaultValue</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">></span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">0</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777"></</span><span style="font-size:9.0pt;font-family:"Courier New";color:#4B69C6">DefaultValue</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">></span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777"><</span><span style="font-size:9.0pt;font-family:"Courier New";color:#4B69C6">ValueMap</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">></span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777"><</span><span style="font-size:9.0pt;font-family:"Courier New";color:#4B69C6">ReturnValue</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">></span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">1</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777"></</span><span style="font-size:9.0pt;font-family:"Courier New";color:#4B69C6">ReturnValue</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">></span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777"><</span><span style="font-size:9.0pt;font-family:"Courier New";color:#4B69C6">SourceValue</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">></span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">student</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777"></</span><span style="font-size:9.0pt;font-family:"Courier New";color:#4B69C6">SourceValue</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">></span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777"></</span><span style="font-size:9.0pt;font-family:"Courier New";color:#4B69C6">ValueMap</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">></span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777"><</span><span style="font-size:9.0pt;font-family:"Courier New";color:#4B69C6">AttributeEncoder</span><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">
</span><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">xsi</span></i><i><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">:</span></i><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">type</span></i><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">=</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#448C27">SAML1String</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">
</span><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">name</span></i><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">=</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#448C27">isEligible</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">
</span><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">encodeType</span></i><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">=</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#448C27">false</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">/></span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777"><</span><span style="font-size:9.0pt;font-family:"Courier New";color:#4B69C6">AttributeEncoder</span><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">
</span><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">xsi</span></i><i><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">:</span></i><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">type</span></i><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">=</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#448C27">SAML2String</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">
</span><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">name</span></i><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">=</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#448C27">isEligible</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">
</span><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">friendlyName</span></i><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">=</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#448C27">isEligible</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">
</span><i><span style="font-size:9.0pt;font-family:"Courier New";color:#8190A0">encodeType</span></i><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">=</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#448C27">false</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#91B3E0">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">/></span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777"></</span><span style="font-size:9.0pt;font-family:"Courier New";color:#4B69C6">AttributeDefinition</span><span style="font-size:9.0pt;font-family:"Courier New";color:#777777">></span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>