Help with MappedAttributeDefinition

Wessel, Keith kwessel at
Fri Aug 19 01:58:19 UTC 2022

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?

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.


From: users <users-bounces at> On Behalf Of Mohamed Lrhazi via users
Sent: Thursday, August 18, 2022 6:26 PM
To: Shib Users <users at>
Cc: Mohamed Lrhazi <lrhazi at>
Subject: Help with MappedAttributeDefinition


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....

How do I implement this logic?

Thanks a lot!

    <AttributeDefinition id="isEligible" xsi:type="Mapped">
        <InputDataConnector ref="sqliteConnector" attributeNames="eduPersonAffiliation"/>
       <AttributeEncoder xsi:type="SAML1String" name="isEligible" encodeType="false" />
       <AttributeEncoder xsi:type="SAML2String" name="isEligible" friendlyName="isEligible" encodeType="false" />
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list