Thursday, April 28, 2011

Create a new SharePoint column in User Profile's list














How to get a hidden Sharepoint List for User Profile?
Here is the way to find out hidden user profile's list in sharepoint: At the top level site in site collection, type this url: /_catalogs/users/simple.aspx , that will give you User Information List's default view.


Go and edit this page(site action >> edit page), and than modifiy Shared webpart. It will give list view of this list, edit the current view. Edit will show the editable view of that user Profile's hidden list.


Now you got the place where you can see all the column from this hidden treasure, now it is the time to add a new column in this list, so you can use this column in your custom permission's code:


Here is the PowerShell to Create a New Coloumn in hidden site collection level's "User Information List"




[system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
$site= New-Object Microsoft.SharePoint.SPSite ("http://YourSiteName")
$web=$site.OpenWeb()
$list=$web.Lists["User Information List"]
$list.Fields.Add("Region1", "Text", 0)

2 comments:

  1. There is another way also. You can directly go to the hidden list for user profile :
    Site Action >> Site Setting >> People and Groups(under users and pemissions group)
    Go to Setting>>List setting of People and Groups
    It will give you the setting page for "User Information List"...

    Here you go, now you can add, delete or edit list columns from your sharepoint's user profile.

    ReplyDelete
  2. Thank you so much. I can able add new field to User Info List using this Powershell script.

    ReplyDelete