<div dir="ltr"><div><span class="gmail_default" style="color:rgb(11,83,148)">Hi Marie, you can use the RPC endpoint:</span><br clear="all"></div><div><span class="gmail_default" style="color:rgb(11,83,148)"><br></span></div><div><span class="gmail_default" style="color:rgb(11,83,148)"><a href="https://docs.evolveum.com/midpoint/reference/support-4.9/interfaces/rest/endpoints/rpc/">https://docs.evolveum.com/midpoint/reference/support-4.9/interfaces/rest/endpoints/rpc/</a></span></div><div><span class="gmail_default" style="color:rgb(11,83,148)"><br></span></div><div><span class="gmail_default" style="color:rgb(11,83,148)">Kind regards, </span></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr" style="color:rgb(34,34,34)"><font face="arial, sans-serif"><br></font></div><div dir="ltr"><font face="arial, sans-serif" color="#666666"><b>Nicolás Rossi</b></font></div><div><font color="#999999" face="arial, sans-serif">Director | Rakkau</font></div><div><font face="arial, sans-serif" color="#999999">+54 (911) 6041-3920<br></font></div><div><font face="arial, sans-serif" color="#999999"><a href="mailto:nrossi@rakkau.com" target="_blank"><font color="#999999">nrossi@rakkau.com</font></a></font></div><div style="color:rgb(34,34,34)"><a href="http://www.rakkau.com/" style="color:rgb(17,85,204)" target="_blank"><font face="arial, sans-serif" color="#666666">www.rakkau.com</font></a></div></div></div></div><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Mar 18, 2025 at 12:59 PM Marie Ioannou via midPoint <<a href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-8067810145997316957">




<div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hello everyone,</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
I have a hook that sets a validTo date when a user loses all their projections. In this case, the user is assigned the "inactive" archetype, along with a minimal objectTemplate.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Conversely, if the user gains a projection (it left for a while from the Resource and came back), another hook removes the validTo date and the user loses their "inactive" archetype.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The issue I'm facing is that when the user loses their archetype, I need to trigger manually a recomputation so that the system applies the default objectTemplate to the user.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Do you know how I can force this recomputation within a hook without manual intervention ? Or do you have another solution ?</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="m_-8067810145997316957Signature">
<table id="m_-8067810145997316957table_0" cellspacing="0" cellpadding="0" style="background-color:white;box-sizing:border-box;border-collapse:collapse;border-spacing:0px">
<tbody>
<tr>
<td style="padding:0cm 0cm 4.5pt;width:229.172px;height:37.15pt">
<p style="line-height:normal;margin:0cm 0cm 8pt;font-family:Calibri,sans-serif;font-size:12pt">
<span style="color:black"><b>Dr. Marie Ioannou</b>  </span></p>
<p style="line-height:normal;margin:0cm 0cm 8pt"><span style="font-family:Calibri,sans-serif;font-size:12pt;color:black">IAM Consultant </span></p>
</td>
<td style="padding:0cm;width:157.219px;height:65.3125px">
<p style="line-height:1.38;margin:0cm 0cm 8pt;font-family:Calibri,sans-serif;font-size:12pt">
<span style="color:rgb(0,0,0)"> </span><span style="font-family:Arial,sans-serif;font-size:12px;color:rgb(51,122,183)"><u><a href="https://www.itconcepts.ch/" id="m_-8067810145997316957OWA674f534e-0191-a3e2-dfbe-afed5fd968d4" title="https://www.itconcepts.ch/" style="color:rgb(51,122,183);margin-top:0px;margin-bottom:0px" target="_blank"><img alt="itc-logo" id="m_-8067810145997316957x__x0000_i1032" width="150" height="40" style="width: 150px; height: 40px; max-width: 655px; min-width: auto; min-height: auto; margin-top: 0px; margin-bottom: 0px;" src="cid:ii_195a9fb32374d664bfb1"></a></u></span></p>
</td>
</tr>
<tr>
<td colspan="2" style="padding:0cm;width:229.172px;height:16.2pt"></td>
</tr>
<tr>
<td colspan="2" style="padding:0cm;width:229.172px;height:22px">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
</td>
</tr>
<tr>
<td colspan="2" style="padding:0cm;width:229.172px;height:16.2pt"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br>
</span></td>
</tr>
<tr>
<td colspan="2" style="padding:0cm;width:229.172px;height:16.2pt"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br>
</span></td>
</tr>
<tr>
<td colspan="2" style="padding:0cm;width:229.172px;height:16.2pt"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br>
</span></td>
</tr>
<tr>
<td colspan="2" style="padding:0.75pt;width:229.172px;height:14.5pt"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br>
</span></td>
</tr>
</tbody>
</table>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
</div>
</div>

_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="https://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">https://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</div></blockquote></div>