<div dir="ltr">HI,<br><div><br>This is exactly the same behavior I've been seeing im my case.<br><br></div><div>First of all,<br><br></div><div>1. I'm using SCRIPTEDSQL connector and an ORACLE DB;<br></div><div>2. I've configured a multi-valued extension attribute - says 'roles' - to receive the roles applied to an user;<br></div><div>3. Configured a metarole to deal with an association. Something like this:<br><br>   <inducement id="3"><br>      <construction><br>         <resourceRef xmlns:tns="<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>"<br>                      oid="ef2bc95b-76e0-48e3-86db-3d4f02d42fff"<br>                      type="tns:ResourceType"><!-- Localhost ScriptedSQL - Oracle  --></resourceRef><br>         <kind>account</kind><br>         <intent>default</intent><br>         <association><br>            <c:ref>ri:priv</c:ref><br>            <outbound><br>               <expression><br>                  <associationFromLink><br>                     <projectionDiscriminator><br>                        <kind>entitlement</kind><br>                        <intent>privilege</intent><br>                     </projectionDiscriminator><br>                  </associationFromLink><br>               </expression><br>            </outbound><br>         </association><br>      </construction><br>      <order>2</order><br>   </inducement><br><br></div><div>4. Made the necessary adjustments on the resource to cope with the association. Like this:<br><br>         <association><br>            <c:ref>ri:priv</c:ref><br>            <kind>entitlement</kind><br>            <intent>privilege</intent><br>            <direction>subjectToObject</direction><br>            <associationAttribute>ri:roles</associationAttribute><br>            <valueAttribute>icfs:name</valueAttribute><br>         </association><br><br></div><div>As to help me understand what goes through the connector, I added some lines in the beginning of 'UpdateScript.groovy' script:<br><br><br></div><div>def now = new Date()<br><br>def file1 = new File('/var/opt/midpoint/icf-connectors/oracle/update.log');<br>if (file1.exists()) {<br>    file1.delete()<br>}<br>file1 << "Update test" << "\n"<br>file1 << "Date = $now" << "\n"<br>file1 << "objectClass = ${objectClass}"<< "\n"<br>file1 << "action = $action" << "\n"<br>file1 << "attributes = ${attributes}" << "\n"<br>file1 << "options = $options" << "\n"<br>file1 << "uid = $uid" << "\n"<br><br></div><div>No matter if I update the current role applied to an user or add another one (as the attribute is multivalued), the result comes like this:<br><br>Update test<br>Date = Fri Oct 07 19:28:07 BRT 2016<br>objectClass = __ACCOUNT__<br>action = UPDATE<br>attributes = [roles:[role1]]<br>options = [:]<br>uid = 161<br><br></div><div>or<br><br>Update test<br>Date = Fri Oct 07 19:29:07 BRT 2016<br>objectClass = __ACCOUNT__<br>action = UPDATE<br>attributes = [roles:[role2]]<br>options = [:]<br>uid = 161<br><br></div><div>when, in my opinion, it should be, for example,<br><br>Update test<br>Date = Fri Oct 07 19:29:07 BRT 2016<br>objectClass = __ACCOUNT__<br>action = UPDATE<br>attributes = [roles:[role1,role2]]<br>options = [:]<br>uid = 161<br></div><div><br></div><div><br></div><div>It seems as the connector treats the "roles" attribute as a single-valued one.<br><br><br></div><div>Carlos A. Ferreira<br></div><div>TRT/MG<br></div><div>Brasil<br></div><div class="gmail_extra"><br></div></div>