Share via


SharePoint 2010: Extending the User Profile Attributes drop down List

It’s possible that you need to map an Active Directory attribute with a new User Profile property. The solution is quite simple:

  • Connect to the Central Administration
  • Under Application Management click Manage Service Applications
  • Select your User Profile Service Application
  • And under People hit Manage User Properties and there you can add a new Property.

When adding a new Mapping between your new Property and your Active Directory Attribute it’s possible that your wanted attribute doesn’t show up in the drop-down list.

Let’s take the example to map a “hidden” attribute shadowExpire.

Now the question is how to I now that this attribute is hidden? Therefore open Forefront Identity Manager and hit Management Agents. Select your Active Directory Domain Services Agent and hit Properties under Actions

 

Navigate till “Select Attributes” and select “Show All”. Now you are able to see all the attributes that you can use and fill by Active Directory.

 

So, under SharePoint, I know that I can use this attribute but it doesn’t show up in my drop-down list. There is a script on MSDN that maps your wished attribute with your property.

First, create a new Property but don’t map to any attribute.

 

Secondly; with the Farm Administrator or any other user who has Farm Administrator rights on your Farm execute the following script:

$url = “http://tehnoonr-ws08-4/:1125" #URL of any site collection that is associated to the user profile service application.

$spsProperty = “EID” #Internal name of the SharePoint user profile property"

$fimProperty = “employeeNumber” #Name of the attribute in FIM/LDAP source"

$connectionName = “sun” #Name of the SharePoint synchronization connection"

$site = Get-SPSite $url

if ($site)

    {Write-Host “Successfully obtained site reference!”}

else

    {Write-Host “Failed to obtain site reference”}

 

$serviceContext = Get-SPServiceContext($site)

if ($serviceContext)

    {Write-Host “Successfully obtained service context!”}

else

    {Write-Host “Failed to obtain service context”}

 

$upManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileConfigManager($serviceContext)

if ($upManager)

    {Write-Host “Successfully obtained user profile manager!”}

else

    {Write-Host “Failed to obtain user profile manager”}

 

$synchConnection = $upManager.ConnectionManager[$connectionName]

if ($synchConnection)

    {Write-Host “Successfully obtained synchronization connection!”}

else

    {Write-Host “Failed to obtain user synchronization connection!”}

 

Write-Host “Adding the attribute mapping…”

 

$synchConnection.PropertyMapping.AddNewMapping([Microsoft.Office.Server.UserProfiles.ProfileType]::User, $spsProperty, $fimProperty)

 

Write-Host “Done!”

 

Update the values of $spsProperty, $fimProperty and $connectionName to match your environment. Note that the direction of this mapping will be “Import”.

Perform a full synchronization after the mapping has been created.

Your Property is now mapped with the wished Active Directory Attribute!