<div style="font-family: Arial, sans-serif; font-size: 14px;">Hi Pavol,</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">thank you for the pointer.</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">It looks like it's working.</div><div style="font-family: Arial, sans-serif; font-size: 14px;">Ended up doing it like this... not sure whether or not there are better ways though</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><div style="color: rgb(101, 123, 131); background-color: rgb(253, 246, 227);"><pre style="font-family:'JetBrains Mono',monospace;font-size:12.0pt"><span style="background-color: rgb(238, 232, 213);">shadowBefore = shadow.clone()<br></span><br><span style="background-color: rgb(238, 232, 213);">shadowPrism = shadow.asPrismObject()<br></span><span style="background-color: rgb(238, 232, 213);">ipath = ItemPath.create(ShadowType.F_ATTRIBUTES, attrQname)<br></span><span style="background-color: rgb(238, 232, 213);">shadowPrism.findOrCreateProperty(ipath).addRealValue(setAttrValue)<br></span><span style="background-color: rgb(238, 232, 213);">delta = shadowBefore.asPrismObject().diff(shadowPrism)<br></span><span style="background-color: rgb(238, 232, 213);">midpoint.executeChanges(delta)<br></span></pre></div></div><div style="font-family: Arial, sans-serif; font-size: 14px;">Kind regards,</div><div style="font-family: Arial, sans-serif; font-size: 14px;">Markus</div><div class="protonmail_quote">
        On Saturday, 7 February 2026 at 18:40, Pavol Mederly via midPoint <midpoint@lists.evolveum.com> wrote:<br>
        <blockquote class="protonmail_quote" type="cite">
            
    <p>Hi Markus,</p>
    <p>certainly. All you need to do is to execute a change against a
      shadow object, modifying specified attribute directly. The
      property path to be used is composed from "attributes" and the
      attribute name, e.g. "attributes/dn".</p>
    <p>Best regards,</p>
    <pre class="moz-signature" cols="72">--
Pavol Mederly
Interim Chief Product Officer
evolveum.com</pre>
    <div class="moz-cite-prefix">On 23/01/2026 13:12, Markus Calmius via
      midPoint wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div style="font-family: Arial, sans-serif; font-size: 14px;">Hi,</div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><span>Is
          it possible to create a task or groovy script to modify a
          particular attribute directly on a resource, in the same way
          as when editing a user’s projection? </span><br>
        <span>Even without an outbound mapping, the attribute is updated
          on the resource. I would like to do this via a task/script
          without defining an outbound mapping, so that changes made by
          the resource are not overwritten by midpoint during
          reconciliations.</span><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">Kind
        regards,</div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;" class="protonmail_signature_block">
        <div class="protonmail_signature_block-user"> Markus</div>
        <div class="protonmail_signature_block-proton protonmail_signature_block-empty">
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre wrap="" class="moz-quote-pre">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com" rel="noreferrer nofollow noopener">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="https://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank" rel="noreferrer nofollow noopener">https://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
  


        </blockquote><br>
    </div>