[midPoint] How to add extension-attribute from HR - inbound Schema ?

Ivan Noris ivan.noris at evolveum.com
Wed Jul 2 10:38:06 CEST 2025


Hi,

I think what you want is to /populate/ (this is the keyword) the 
assignment properties. That is done outside the "target" element, but in 
"assignmentTargetSearch".

You should be able to use assignment properties (extensions) like this:

<expression>
     <assignmentTargetSearch>
         <targetType>OrgType</targetType>
         <filter>
             <!-- ... --> </filter>
         <populate>
             <populateItem>
             <expression>
                 <script>
                     <code>return 'General Manager of Universe'</code>
                 </script>
             </expression>
             <target>
                 <path>_extension/title_</path>
             </target>
             </populateItem>
         </populate>
     </assignmentTargetSearch>
</expression>

See also here: 
https://docs.evolveum.com/midpoint/reference/support-4.9/expressions/expressions/#assignment-target-search
Relation and subtype can be set using "assignmentProperties" element as 
displayed in the documentation (chapter: *Relation parameter*).
Chapter: *Activation parameters* shows how activation properties of 
assignment can be set; the example above for extension property is 
analogous.

Hope this helps.
Best regards,
Ivan

On 30. 6. 2025 18:40, Bao Tran via midPoint wrote:
> Hi all,
>
> 1. We have successfully added an AssignmentExtensionSchema.xml  
> (attachment) with detail:
> - extension ref="c:AssignmentType"
> - name=JobTitle
> - DisplayName=*title*
>
> And in  midpoint GUI , it look like screenshot below
> title extension.png
>
>
> 2. Currently, we can only add assignment to user via OrganizationName 
> (below xml)
>
> Our goal: is how to configure the *HR-application-inbound.xml.* :: 
> *inbound-schema* , in order to
> - Assign the user into Organization and add value for the 
> *title* (which is extension above)
>
>
> <attribute id="49">
> <ref>ri:OrganizationName</ref>
>             <inbound id="50">
> <name>set-org-level1</name>
>                           <expression>
> <assignmentTargetSearch>
>  <targetType>OrgType</targetType>
>  <filter>
> <q:equal>
>      <q:path>name</q:path>
>      <expression>
>             <script>
>                    <code>input</code>
>              </script>
>         </expression>
>  </q:equal>
>  </filter>
> </assignmentTargetSearch>
>  </expression>
>
> *<target>**
>  <path>assignment</path>*
>                                         <-- We can only find the 
> OrganizationName and make assignment for user -->
> <-- How do we set value for extension::JobTitle above ? -->
> *</target>*
>              </inbound>
> </attribute>
>
> Thank you in advance
> -- 
> Bao Tran
> Software developer
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> https://lists.evolveum.com/mailman/listinfo/midpoint

-- 
Ivan Noris
Expert Identity Engineer
evolveum.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20250702/87a00263/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: title extension.png
Type: image/png
Size: 135041 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20250702/87a00263/attachment-0001.png>


More information about the midPoint mailing list