Post

Moving user properties up in SharePoint with PowerShell
We encountered an issue when we created a custom property in the User Profile Service Application and we wanted to move this property to ‘Contact Information’. We could click on the up arrow but the property remained on the same spot after the refresh. We have discussed this issue with Microsoft and they have provided […]

We encountered an issue when we created a custom property in the User Profile Service Application and we wanted to move this property to ‘Contact Information’. We could click on the up arrow but the property remained on the same spot after the refresh. We have discussed this issue with Microsoft and they have provided us with the below solution. This solution is not yet fully supported on SharePoint 2013 and they are in the process of creating a KB article for this issue, but this can perhaps help you as a workaround.

Scenario

I have created a new property called ‘Custom’ that I want to add to contact information

image

After a lot of clicking and refreshing I managed to get it till ‘Picture Placeholder State’ but could not get it to move higher

image

Issue

You can view the display ID with PowerShell for all user properties using the following commands.

First create a connection to the User Profile Manager

$MySite = Get-SPSite <MySiteHostURL>
$context = Get-SPServiceContext $MySite
$profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)

image

Then type

$profilemanager.properties | ft name,displayorder

To view the current order

image

My custom property has the same order as ‘Picture Placeholder State’ which perhaps stops it from moving up.

image

Solution

You can set the display order for a property using PowerShell but always make sure this ID does not exist and only use this command when you get stuck from moving a property up.

In this scenario I will move it to 5101 which is above ‘WorkEmail’

$profileManager.Properties.SetDisplayOrderByPropertyName("Custom",5101)
$profileManager.Properties.CommitDisplayOrder()

image

image

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Archive