<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Dharmendra,<br>
<br>
I see several issues with your code:<br>
<br>
You cannot add assignment to an account shadow. Shadows just
reflect how the account looks on the resource. They follow the
reality and they do NOT specify policy. See here:
<a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Assigning+vs+Linking">https://wiki.evolveum.com/display/midPoint/Assigning+vs+Linking</a><br>
<br>
You need to add assignment to the user. MidPoint is a typical IDM
product which means it is centered around the concept of a user.
The assignment specifies a policy and policy is bound to the user.
See here: <a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Assignment">https://wiki.evolveum.com/display/midPoint/Assignment</a>
and here:
<a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Assignment+Configuration">https://wiki.evolveum.com/display/midPoint/Assignment+Configuration</a><br>
<br>
Your code is a bit confusing here. It sets the type of shadowDelta
to RoleType. But both is wrong. You probably do not want to modify
the assignment of a role either. You probably want to add or
modify the assignment of user. The model-client-sample already has
a code to do this.<br>
<br>
But maybe I have not understood what you are trying to do
correctly. If this is the case then it would be best if you
describe what you are trying to achieve. <br>
<br>
BTW: There is a way how to manipulate the account directly. But in
that case you cannot use assignments. You need to directly modify
account attributes or entitlements
(<a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Entitlements">https://wiki.evolveum.com/display/midPoint/Entitlements</a>). But
this is not what IDM systems are primarily designed to do.<br>
<br>
<pre class="moz-signature" cols="72">--
Radovan Semancik
Software Architect
evolveum.com
</pre>
<br>
<br>
On 12/29/2014 12:30 PM, dharmendra parakh wrote:<br>
</div>
<blockquote
cite="mid:CAKvVWqx5XXf--hm2G4tK1Fpb_hidu=m6Gb3gQ+9bXSPTS9NbZg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi
<div><br>
</div>
<div>Hope you all had a nice Christmas, I wish you all a very
Happy new year 2015 ahead.</div>
<div><br>
</div>
<div>I have a requirement where i have to provision
account/resource to a role/user in midpoint using model web
service. I was able to create and search account using web
service client (model-client-sample)</div>
<div><br>
</div>
<div>- I need some pointers on how to update the account. I
tried few things some didn't work and some worked partially.
can you help me providing the right way or a code snippet to
do it.</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>I have attached a code snippet which replaces the role
assignment and it works if i remove the attribute itself
from construction but when i try to remove some values of a
multi-valued attribute instead of removing those values it
tries to add other value which are already present</div>
</blockquote>
<div><br>
</div>
<div>- One more thing there is a method in web service to get
the owner of shadow account but that can be a user only, how
we can get the owner of a shadow if that owner is a role.</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>following is the method:</div>
</blockquote>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><b>findShadowOwner(shadowOid, user, result);</b></div>
</blockquote>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>Thanks & regards</div>
<div>Dharmendra</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
midPoint-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint-dev@lists.evolveum.com">midPoint-dev@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint-dev">http://lists.evolveum.com/mailman/listinfo/midpoint-dev</a>
</pre>
</blockquote>
<br>
<br>
</body>
</html>