SharePoint 2013 - changing the order of User Profile properties

We had a request come in recently to allow staff to add some custom text to their email signatures. Simple, thought the Systems Admin, we'll just put it in an Active Directory property and then bring that into the rules that create the signatures. Sorted.

But how do we get the text in there? Are we really going to have IT Support update Active Directory every time someone wants to change their text? Of course we're not! We need a way to allow the staff to update this for themselves.

Which is where SharePoint comes in. We create a new User Profile property, give it suitable settings so that people can view and update it, and create a property mapping for synchronization to Active Directory. Job done, time for a coffee....

But people aren't happy, when they try to edit their profile on SharePoint they can't find the textbox for our new property. Why? Because SharePoint has chosen to put it in the Custom Properties section!

And what's the point in giving our people a nice new piece of functionality and then making it difficult to find? Thanks SharePoint!

So let's move our new field into the Contact Information section where it will be easier to find and which makes reasonable sense for it to be. Off we go Central Admin > Manage Service Applications > User Profile Service > Manage User Properties where we find that the only way to move a property is by using an up or down arrow in the list:

And SharePoint does a postback for every click! Do we seriously have to click this arrow, wait for the page to reload, scroll down to our property again (now one whole line higher up the list) and click again and again until it's in the right place? Wow SharePoint, you've really helped us out this time.

Fortunately it doesn't have to be this way. PowerShell comes to help where the GUI fails abysmally, and it's as simple as this:

Step 1 - get the current display order of our User Profile properties:

$MySite = Get-SPSite http://<mysite-url>

$context = Get-SPServiceContext $MySite

$profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)

$ | ft name,displayorder

This will output a list of the properties with a number for each one indicating the display order. There are plenty of gaps in the display order number sequence so if you're lucky you'll be able to pick an unused number right where you want it. We want our custom property to go right after the "Assistant" property in Contact Information which as luck would have it is number 5110 and we can use 5111 for our property without causing any clash.

Step 2 - tell SharePoint the display order number we want to use for our property:



And that's it, our new property now sits nicely in the Contact Information of the user profile edit form, where it can be found easily and is actually likely to get used and not forgotten.