<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">You can easily get all users that have
<b>directly</b> assigned a role - it is a search on UserType using
the following criteria:<br>
<br>
<ref><br>
<path>assignment/targetRef</path><br>
<value><br>
<oid>00000000-0000-0000-0000-000000000004</oid><br>
<type>RoleType</type><br>
</value><br>
</ref><br>
<br>
(replace 00000000-0000-0000-0000-000000000004 with the OID of your
role)<br>
<br>
However, this does not find users that have such a role assigned
indirectly (e.g. as inducement in another role). This is not
currently supported.<br>
<br>
Best regards,<br>
Pavol<br>
<br>
</div>
<blockquote
cite="mid:CAJG9dDtajBfKv3WsnRCZgwio5XZTwHUcqOyVUHoS6QTvqf4XSA@mail.gmail.com"
type="cite">
<div dir="ltr">HI
<div><br>
</div>
<div>Thanks for the information, this works.</div>
<div><br>
</div>
<div>One more thing Our requirement is to reconcile users
associated to some specific role, So is there a way to get the
users associated to a role without iterating all the users.</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks!</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Feb 12, 2015 at 3:27 PM, Pavol
Mederly <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:mederly@evolveum.com" target="_blank">mederly@evolveum.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hello Manish,<br>
<br>
I've just pushed a sample code that demonstrates this.<br>
<br>
Here is the java code - actually, it's an empty
modification with RECONCILE option set (see red lines):<br>
<br>
<p><span><span> </span>private static void
reconcileUser(ModelPortType modelPort, String oid)
throws FaultMessage {</span></p>
<span style="font-family:"Courier New""> </span>
<p><span><span> </span>ObjectDeltaType userDelta
= new ObjectDeltaType();</span></p>
<p><span><span> </span>userDelta.setOid(oid);</span></p>
<p><span><span> </span>userDelta.setObjectType(ModelClientUtil.getTypeQName(UserType.class));</span></p>
<p><span><span> </span><span> </span>userDelta.setChangeType(ChangeTypeType.MODIFY);</span></p>
<p><span> </span></p>
<p><span><span> </span>ObjectDeltaListType
deltaList = new ObjectDeltaListType();</span></p>
<p><span><span> </span>deltaList.getDelta().add(userDelta);</span></p>
<p><span> </span></p>
<p><font color="#cc0000"><span
style="font-family:"Courier New""><span>
</span>ModelExecuteOptionsType optionsType = new
ModelExecuteOptionsType();</span></font></p>
<font color="#cc0000"> </font>
<p><font color="#cc0000"><span
style="font-family:"Courier New""><span>
</span>optionsType.setReconcile(true);</span></font></p>
<font color="#cc0000"> </font>
<p><span><span> </span>modelPort.executeChanges(deltaList,
optionsType);</span></p>
<p><span><span> </span>}</span></p>
<br>
This is how it looks like in XML:<br>
<br>
<font size="-1"><soap:Body><br>
<ns8:executeChanges <br>
xmlns:ns2=<a moz-do-not-send="true"
href="http://prism.evolveum.com/xml/ns/public/types-3"
target="_blank">"http://prism.evolveum.com/xml/ns/public/types-3"</a>
<br>
xmlns:ns3=<a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a>
<br>
xmlns:ns8=<a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/model/model-3"
target="_blank">"http://midpoint.evolveum.com/xml/ns/public/model/model-3"</a>
<br>
xmlns:ns9=<a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"
target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"</a>><br>
<br>
<ns8:deltaList><br>
<ns9:delta><br>
<ns2:changeType>modify</ns2:changeType><br>
<ns2:objectType>ns3:UserType</ns2:objectType><br>
<ns2:oid>c0c010c0-d34d-b33f-f00d-11111111ec1e</ns2:oid><br>
</ns9:delta><br>
</ns8:deltaList><br>
<font color="#cc0000"> <ns8:options><br>
<ns3:reconcile>true</ns3:reconcile><br>
</ns8:options><br>
</font> </ns8:executeChanges><br>
</soap:Body></font><br>
<br>
Hope this helps.<br>
Pavol
<div>
<div class="h5"><br>
<br>
On 10. 2. 2015 22:40, Manish Baid wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div
style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica
Neue,Helvetica,Arial,Lucida
Grande,sans-serif;font-size:14px">
<div dir="ltr">Hi,</div>
<div dir="ltr">Using webservice client, can you
please share some pointers on how to:
programmatically "reconcile a user"?</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Basically, we are trying to
re-enforce role-inducement updates to "affected"
users.<br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Thanks<br>
</div>
<div dir="ltr"> </div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
</body>
</html>