[midPoint] Dynamic Role Assignment

Ivan Noris Ivan.Noris at evolveum.com
Sat Mar 12 18:30:36 CET 2016


Hi Gauri, 

this is easily possible using Object Templates. 

Please refer to one or our samples for example: 
https://github.com/Evolveum/midpoint/blob/master/samples/objects/user-template-complex.xml 

<!-- RB-RBAC functionality. The Pirate role is automatically assigned based on the value of employeeType property --> 
<mapping> 
<source> 
<path>employeeType</path> 
</source> 
<expression> 
<value> 
<assignment> 
<targetRef oid="12345678-d34d-b33f-f00d-987987987988" type="RoleType"/> 
</assignment> 
</value> 
</expression> 
<target> 
<path>assignment</path> 
</target> 
<condition> 
<script> 
<language>http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</language> 
<code>employeeType == 'PIRATE'</code> 
</script> 
</condition> 
</mapping> 

Regards, 
Ivan 
----- Original Message -----

> From: "GAURI SHIRSATH" <gauri15.shirsath at gmail.com>
> To: midpoint at lists.evolveum.com
> Sent: Saturday, March 12, 2016 8:14:01 AM
> Subject: [midPoint] Dynamic Role Assignment

> Hi,

> Can you please guide me for how to assign a role to user dynamically based on
> some attribute value?

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

> Thank you,
> Gauri

> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint

-- 
Ing. Ivan Noris 
Senior Identity Management Engineer & IDM Architect 
evolveum.com evolveum.com/blog/ 
___________________________________________________ 
"Semper ID(e)M Vix." 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20160312/a48a3b82/attachment.htm>


More information about the midPoint mailing list