SharePoint 20XX: Extending the User Profile Attributes drop down List

SharePoint 20XX: 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.
Extending the User Profile Attributes drop down List

Extending the User Profile Attributes drop down List

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.

Extending the User Profile Attributes drop down List

Extending the User Profile Attributes 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

Extending the User Profile Attributes drop down List

Extending the User Profile Attributes drop down List

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.

Extending the User Profile Attributes drop down List

Extending the User Profile Attributes drop down List

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:

Extending the User Profile Attributes drop down List

Extending the User Profile Attributes drop down List

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”.

This is the result of the little script:

Extending the User Profile Attributes drop down List

Extending the User Profile Attributes drop down List

Perform a full synchronization after the mapping has been created. Your Property is now mapped with the wished Active Directory Attribute!

Happy SharePointing!

Leave a Comment
  • Please add 8 and 8 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Gokan Ozcifci edited Original. Comment: MSDN link as ref

Page 1 of 1 (1 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Gokan Ozcifci edited Original. Comment: MSDN link as ref

Page 1 of 1 (1 items)