<div dir="ltr">Hi Patrik,<div><br></div><div>try this:</div><div><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="CS" style="font-family:Arial,sans-serif;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><outbound></span><span lang="CS" style="font-family:Arial,sans-serif"><br>
<span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">            <expression></span><br>
<span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">                        <value>ImportantValue</value></span><br>
<span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">            </expression></span><br>
<span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">            <target></span><br>
<span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">                        <set></span><br>
<span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">                                   <predefined>all</predefined></span><br>
<span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">                        </set></span><br>
<span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">            </target></span><br>
<span style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"></outbound</span></span><span lang="CS"></span></p></div><div>Regards</div><div>Lubo</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">št 6. 7. 2023 o 11:19 Patrik Sidler via midPoint <<a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a>> napísal(a):<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>





<div lang="DE-CH">
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif">Hi Commuinity,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Verdana,sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif">I have created a Role, that sets a predefined Attribute Value on an users Active Directory Account when the role I assigned.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal" style="background:rgb(43,43,43)"><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(232,191,106)"><role
</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(186,186,186)">xmlns</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)">=</span><span style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)"><a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank"><span lang="EN-US">http://midpoint.evolveum.com/xml/ns/public/common/common-3</span></a></span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)"><br>
      </span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(186,186,186)">xmlns:</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(152,118,170)">c</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)">=</span><span style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)"><a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank"><span lang="EN-US">http://midpoint.evolveum.com/xml/ns/public/common/common-3</span></a></span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)"><br>
      </span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(186,186,186)">xmlns:</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(152,118,170)">icfs</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)">=</span><span style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)"><a href="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" target="_blank"><span lang="EN-US">http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3</span></a></span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)"><br>
      </span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(186,186,186)">xmlns:</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(152,118,170)">org</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)">=</span><span style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)"><a href="http://midpoint.evolveum.com/xml/ns/public/common/org-3" target="_blank"><span lang="EN-US">http://midpoint.evolveum.com/xml/ns/public/common/org-3</span></a></span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)"><br>
      </span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(186,186,186)">xmlns:</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(152,118,170)">q</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)">=</span><span style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)"><a href="http://prism.evolveum.com/xml/ns/public/query-3" target="_blank"><span lang="EN-US">http://prism.evolveum.com/xml/ns/public/query-3</span></a></span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)"><br>
      </span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(186,186,186)">xmlns:</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(152,118,170)">ri</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)">=</span><span style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)"><a href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3" target="_blank"><span lang="EN-US">http://midpoint.evolveum.com/xml/ns/public/resource/instance-3</span></a></span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)"><br>
      </span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(186,186,186)">xmlns:</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(152,118,170)">t</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)">=</span><span style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)"><a href="http://prism.evolveum.com/xml/ns/public/types-3" target="_blank"><span lang="EN-US">http://prism.evolveum.com/xml/ns/public/types-3</span></a></span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(232,191,106)">><br>
    <name></span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(169,183,198)">SetValue</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(232,191,106)"></name><br>
    <description></span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(169,183,198)">Role required to set a Value on an Attribute</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(232,191,106)"></description><br>
    <indestructible></span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(169,183,198)">true</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(232,191,106)"></indestructible><br>
    <requestable></span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(169,183,198)">true</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(232,191,106)"></requestable><br>
    <inducement </span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(186,186,186)">id</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)">="2"</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(232,191,106)">><br>
        <construction><br>
            <resourceRef </span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(186,186,186)">oid</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)">="fb3f7385-7a9a-4e8c-926e-8fc23de7efb5"
</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(186,186,186)">relation</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)">="org:default"
</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(186,186,186)">type</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(106,135,89)">="c:ResourceType"</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(232,191,106)">/><br>
            <attribute><br>
                <ref></span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(169,183,198)">ri:extensionAttribute1</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(232,191,106)"></ref><br>
                <outbound><br>
                    <expression><br>
                        <value></span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(169,183,198)">ImportantValue</span><span lang="EN-US" style="font-size:10pt;font-family:"JetBrains Mono";color:rgb(232,191,106)"></value><br>
                    </expression><br>
                </outbound><br>
            </attribute><br>
        </construction><br>
    </inducement><br>
</role><br>
<br>
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif">The Assignment works perfect. As soon as the Role is assigned, the Value is available on the Users Active Directory Account.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif">But when I remove the Role, the value stays on the Attribute. It will not be removed when I unassign the Role?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif">I do not know if this is possible or not.
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif">But It would be great if anyone is having an Idea how to clean up the Attribute when I unassign the Role.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif">Thank you in advance for your help.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif">Best Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Verdana,sans-serif">Patrik<u></u><u></u></span></p>
</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></div>