How to override full name

You know, at the beginning every IDM project is clear and ideal. Everything seems to work well in the test environment, but as time goes by, the deadline is close and your customer finds more and more special cases. These cases have to be part of the solution “somehow” and “quickly” and of course they are found just in production. In many cases the problem is that we have good but not 100{1acb01afcc33953bed28d92be9d735e579722d77ac7936fdfc467b8d28505288} correct HR data. Yes, you could say (in most cases): “this is not my problem” or this is “customer’s” problem and they need to fix the source data in HR… and yes, it WILL BE fixed, maybe in a day or a week or a month, but you need to do it “NOW” or “yesterday” (as usual). We are professionals, we can’t go live with the system, where client’s BIG BOSS (or CEO, …) has full name with a typo, without diacritics or without honorifics and so on. Before the IDM project, this data was not visible and not online or up-to-date. If you update it in midPoint, HR system will replace it with its own (bad) one upon next synchronization. So the question is, how to override full name (not only for) VIP persons?

It’s easy because you have the best open source IDM solution at hand. You can extend the schema, create new attribute “Override Full Name”, and also update generation of full name what you already have done in user object template. I will explain it in the next steps.

Step 1: Extend the User Schema

Create a new extension.xsd file in [midpoint-home]\schema\ directory with this content:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsd:schema elementFormDefault="qualified"

  <xsd:complexType name="UserExtensionType">
        <a:extension ref="c:UserType"/>
      <xsd:element name="overrideFullName" type="xsd:string" minOccurs="0" maxOccurs="1">
            <a:displayName>Override Full Name</a:displayName>
            <a:help>Override Full Name calculated from Given and Family Name</a:help>


(Or open your existing file and put the appropriate code fragment to it.) 

Step 2: Restart midPoint

Stop and start tomcat service to read the extension schema.

Step 3: Create User object template

Log in to midPoint, go to menu –> Configuration –> Import object –> Get objects from “Embedded editor”, paste the next code snippet and click “Import object” button.

<objectTemplate xmlns="" xmlns:q="" xmlns:c="" xmlns:t="" xmlns:org="" xmlns:icfs="" xmlns:ri="" oid="c0c010c0-d34d-b33f-f00d-777222222333" version="0">

  <name>Sample User Template</name>
      Property mapping.
      Defines how properties of user object are set up.
      This specific definition sets a full name as a concatenation
      of givenName and familyName.
      If overrideFullName is filled return this by default.
      <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="!basic.isEmpty(overrideFullName))%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20overrideFullName%3B%0A%0A%20%20%20%20%20%20%20%20%20%20return%20givenName%20%2B%20'%20'%20%2B%20familyName%0A%20%20%20%20%20%20%20%20%3C%2Fcode%3E%0A%20%20%20%20%20%20%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="&lt;script&gt;" title="&lt;script&gt;" />


Enable new user object template in menu –> Configuration –> System –> Object policies –> Edit –> select Object type = “UserType”, Object template = “Sample User Template” –> click “Save” & “Save” button.

(If you already have user object template put/edit appropriate code snippet.)

Step 4: Fill in new extended property to verify functionality

Open existing user over menu –> List users –> click on existing user –> on tab “Basic”, at the end of line “Properties” click on “Show empty fields”, find new property “Override Full Name” and fill in the correct full name –> click “Save” button. Now you can see in the standard “Full name” property the correct property:


(or create a new user and fill Name, First name, Last name and Override Full Name)

With the same principles, you can override any other required attributes.

Enjoy your super work and excellent feedback from the customer, and do not forget to thank to midPoint and Evolveum by considering subscription and/or partnership.

…and don’t tell to your BIG boss how easy the solution this BIG HR problem has in midPoint and don’t hesitate to ask for rewards! 😉

Leave a Reply

Your email address will not be published.