[midPoint] How to remove User attribute value

Arnošt Starosta - AMI Praha a.s. arnost.starosta at ami.cz
Fri Mar 16 11:12:22 CET 2018


Hi Brad,

i had a similar problem and in the end removed the attribute values by bulk
action. Delta with modificationType 'replace' did the trick. Hope it works
for you.

arnost

        <se:executeScript xmlns:s="
http://midpoint.evolveum.com/xml/ns/public/model/scripting-3">
            <s:search>
                <s:type>c:UserType</s:type>
                <s:searchFilter>
                        ...
                </s:searchFilter>

                <s:action>
                    <s:type>modify</s:type>
                    <s:parameter>
                        <s:name>delta</s:name>
                        <value xsi:type="t:ObjectDeltaType">
                            <t:changeType>modify</t:changeType>
                            <t:itemDelta>

<t:modificationType>replace</t:modificationType>
                                <t:path>extension/yourAttribute</t:path>
                                <t:value></t:value>
                            </t:itemDelta>
                        </value>
                    </s:parameter>
                    <s:parameter>
                        <s:name>raw</s:name>
                        <value>true</value>
                    </s:parameter>
                </s:action>
            </s:search>
        </se:executeScript>


2018-03-14 21:42 GMT+01:00 Brad Firestone <bhotrock at gmail.com>:

> I'm trying to figure out how to remove values from custom schema user
> attributes.
>
> When I first started with midPoint, I thought it would be a good idea to
> create some midPoint User attribute values as part of a read-only Active
> Directory Resource.  That way when a midPoint user was created, they would
> automatically have certain attribute values.
>
> I've since figured out that isn't the best way to do this.  I have removed
> these inbound mappings from my AD Resource.  I will now handle the
> creation/removal of these attribute values through assignment/inducement.
>
> But I need to clean up these values so they are "blank".  I've tried lots
> of different combinations of things in my User Template.  I can change the
> values easily this way, but can't make it "blank".  From what I see in the
> wiki, I would think that the following mapping in my User Template should
> work, but it doesn't.
>
> <mapping>
> <name>Clear old myAttribute</name>
> <authoritative>true</authoritative>
> <tolerant>false</tolerant>
> <strength>strong</strength>
> <expression>
> <value/>
> </expression>
> <target>
> <c:path>$user/extension/myAttribute</c:path>
> </target>
> </mapping>
>
> Does anyone have an idea of how I can completely clear any values from
> this midPoint User attribute?
> Thanks!
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>



-- 

Arnošt Starosta
solution architect

gsm: [+420] 603 794 932
e-mail: arnost.starosta at ami.cz


AMI Praha a.s.
Pláničkova 11
162 00 Praha 6
tel.: [+420] 274 783 239
web: www.ami.cz


[image: AMI Praha a.s.]

[image: AMI Praha a.s.]
<http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management>

Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za
společnost AMI Praha a.s.
jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně
písemnou formu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180316/0816315d/attachment.htm>


More information about the midPoint mailing list