<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hi Community,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I am trying to create a conditional inducement on an organisation, so that depending on the type of relation the User has to the organisation, will determine which inducement will apply. We would like to manage the membership of Microsoft 365 Groups based on
 the user's assignment to a specific organisation. So, if the user is a member, they are added as a member of a specific M365 Group and if they are assigned as the relation="org:manager", then they are added as an owner to that same M365 Group. We have the
 inducement construction working as we want, but of course assigning two inducements to the same organisation without any conditional logic, just results in both inducements being applied to an assigned user.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I am struggling to develop the condition to make this work. I have developed a query that will return the UID of the user if they are assigned as a member of the org, but cannot work out how to use this in the conditional logic within the inducement.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
 My Inducement on the org object is as follows:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
    <inducement>
<div>        <construction></div>
<div>            <resourceRef oid="052f1f9a-34c3-4e9e-b011-7b1d1528e202" relation="org:member" type="c:ResourceType"></div>
<div>                <!-- Azure AD --></div>
<div>            </resourceRef></div>
<div>            <kind>account</kind></div>
<div>            <association></div>
<div>                <ref>ri:m365-member</ref></div>
<div>                <outbound></div>
<div>                    <expression></div>
<div>                        <value xmlns=""></div>
<div>                            <shadowRef xmlns=""></div>
<div>                                <oid>57f29a9f-65d8-49b5-8a1b-294fa8266422</oid></div>
<div>                            </shadowRef></div>
<div>                        </value></div>
<div>                    </expression></div>
<div>                </outbound></div>
<div>            </association></div>
<div>        </construction></div>
<div>        <focusType>c:UserType</focusType></div>
<div><span>    <condition></span><br>
</div>
<div><span><span>      <!-- Help needed --></span><br>
</span></div>
<div><span><span>    </condition></span><br>
</span></div>
    </inducement><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I understand the conditional logic sits within the inducement block itself, alongside the focusType constraint, which we have also specified. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
My query is below, which will return users who have been assigned as a member of a specific org is below. I just need some help tying the two together:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<query xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3">
<div>    <filter></div>
<div>       <or></div>
<div>           <ref></div>
<div>               <path>assignment/targetRef</path></div>
<div>               <value relation="org:default" oid="e0e38cd2-f385-43cd-b293-10efe5369549"/></div>
<div>           </ref></div>
<div>            <ref></div>
<div>               <path>assignment/targetRef</path></div>
<div>               <value relation="org:member" oid="e0e38cd2-f385-43cd-b293-10efe5369549"/></div>
<div>           </ref></div>
<div>       </or></div>
<div>    </filter></div>
</query><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Thank you</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Regards,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Stefano</div>
</body>
</html>