<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Hi Gauri,<br></div><div><br></div><div>this is easily possible using Object Templates.<br></div><div><br></div><div>Please refer to one or our samples for example:<br></div><div><a href="https://github.com/Evolveum/midpoint/blob/master/samples/objects/user-template-complex.xml">https://github.com/Evolveum/midpoint/blob/master/samples/objects/user-template-complex.xml</a></div><div><br></div><div> <!-- RB-RBAC functionality. The Pirate role is automatically assigned based on the value of employeeType property --><br> <mapping><br> <source><br> <path>employeeType</path><br> </source><br> <expression><br> <value><br> <assignment><br> <targetRef oid="12345678-d34d-b33f-f00d-987987987988" type="RoleType"/><br> </assignment><br> </value> <br> </expression><br> <target><br> <path>assignment</path><br> </target><br> <condition><br> <script><br> <language>http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</language><br> <code>employeeType == 'PIRATE'</code><br> </script><br> </condition><br> </mapping><br><br></div><div>Regards,<br></div><div>Ivan<br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"GAURI SHIRSATH" <gauri15.shirsath@gmail.com><br><b>To: </b>midpoint@lists.evolveum.com<br><b>Sent: </b>Saturday, March 12, 2016 8:14:01 AM<br><b>Subject: </b>[midPoint] Dynamic Role Assignment<br><div><br></div><div dir="ltr"><span style="font-size:12.8px" data-mce-style="font-size: 12.8px;">Hi,</span><div style="font-size:12.8px" data-mce-style="font-size: 12.8px;"><br></div><div style="font-size:12.8px" data-mce-style="font-size: 12.8px;">Can you please guide me for how to assign a role to user dynamically based on some attribute value?</div><div style="font-size:12.8px" data-mce-style="font-size: 12.8px;"><br></div><div style="font-size:12.8px" data-mce-style="font-size: 12.8px;">Like, if my data is coming in to midpoint from CSV file and I want to assign a user role based on some attribute value.</div><div style="font-size:12.8px" data-mce-style="font-size: 12.8px;"><br></div><div style="font-size:12.8px" data-mce-style="font-size: 12.8px;"><br></div><div style="font-size:12.8px" data-mce-style="font-size: 12.8px;">Thank you,</div><div style="font-size:12.8px" data-mce-style="font-size: 12.8px;">Gauri</div></div><br>_______________________________________________<br>midPoint mailing list<br>midPoint@lists.evolveum.com<br>http://lists.evolveum.com/mailman/listinfo/midpoint<br></blockquote><div><br><br></div><div><br></div><div>-- <br></div><div><span name="x"></span> Ing. Ivan Noris<br> Senior Identity Management Engineer & IDM Architect<br> evolveum.com evolveum.com/blog/<br> ___________________________________________________<br> "Semper ID(e)M Vix."<br><span name="x"></span><br></div></div></body></html>