[midPoint] fire-and-forget action to update attribute in resource
Markus Calmius
markus.calmius at proton.ch
Mon Feb 9 14:53:20 CET 2026
Hi Pavol,
thank you for the pointer.
It looks like it's working.
Ended up doing it like this... not sure whether or not there are better ways though
shadowBefore = shadow.clone()
shadowPrism = shadow.asPrismObject()
ipath = ItemPath.create(ShadowType.F_ATTRIBUTES, attrQname)
shadowPrism.findOrCreateProperty(ipath).addRealValue(setAttrValue)
delta = shadowBefore.asPrismObject().diff(shadowPrism)
midpoint.executeChanges(delta)
Kind regards,
Markus
On Saturday, 7 February 2026 at 18:40, Pavol Mederly via midPoint <midpoint at lists.evolveum.com> wrote:
> Hi Markus,
>
> 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".
>
> Best regards,
>
> --
> Pavol Mederly
> Interim Chief Product Officer
> evolveum.com
>
> On 23/01/2026 13:12, Markus Calmius via midPoint wrote:
>
>> Hi,
>> 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?
>> 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.
>>
>> Kind regards,
>>
>> Markus
>>
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com
>>
>> https://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20260209/71de86f3/attachment.htm>
More information about the midPoint
mailing list