SharePoint User Information List (Hidden List)

In this tutorial, we will discuss the SharePoint user information list. What is a user information list in SharePoint? How to retrieve the user information list from the browser? How to get user information list by using the server object model URL? How to retrieve user information fields using the server object model?

Most of us know that SharePoint has many hidden lists to perform various tasks. Now we are doing deep dive on the “users” list. This list is one of the important lists that exists at the site collection level. The hidden Users list was there from MOSS onwards and you can see this list even in SharePoint 2016 also.

Note: This list can be accessed by only Site Collection administrators and FARM administrators.

SharePoint User Information List

Now, let us understand what is a user information list in SharePoint?

The “User Information List” in SharePoint stores the information about a user with some metadata configured/added to the user as part of Active Directory (AD) like user Picture, DisplayName, and Login Name (domain\user-id) e.t.c.

The SharePoint user information list is a hidden list and is only visible to SharePoint administrators. The list is available in SharePoint 2013, SharePoint 2016, and guess in SharePoint 2019 and SharePoint Online also.

How SharePoint User Information List gets data?

As soon as you add/grant access to a user at subsite/ Site Collection level SharePoint added a new entry in this list with the latest information of that user from AD.

In precise if there is any change in user details especially in user-email (or) user role SharePoint adds one more new entry in this list as there is a change in user’s metadata. So, sometimes we end up finding more than one entry for one user.

How to access User Information List in UI?

The SharePoint User Information List can be accessed via the browser by navigating to “/_catalogs/users/simple.aspx” from your site.

Ex: http://contoso.com/_catalogs/users/simple.aspx

You can see a screenshot of SharePoint Online user information list for on of my SharePoint Online site.

sharepoint user information list
sharepoint Online user information list

Connect with User Information List using SharePoint Server-side Object Model

In SharePoint 2013/2016/2019, We can connect to this user information hidden list to get the user information for the required user. Please find the below code snippet for the same.

// Instantiates the User Information List
SPList userInformationList = SPContext.Current.Web.SiteUserInfoList;
// Get the current user
SPUser user = SPContext.Current.Web.EnsureUser(@"CONTOSO\krishna");
// The actual User Information is within this ListItem SPListItem userItem = userInformationList.Items.GetItemById(user.ID);
string pictureURL = userItem["Picture"].ToString();

With the above code snippet, you can get the picture URL of the SharePoint user. This clearly shows that reading information from this list is as same as any other list in SharePoint.

User Information List Fields

I would like to make our life easy, below is the code snippet to get all the fields and their internal names.

You can copy this code in a Console application to see the results.

SPWeb spWeb = new SPSite(http://contoso.com/).OpenWeb();
SPUser user = spWeb.ensureUser(@"CONTOSO\krishna");
SPListItem item = spWeb.SiteUserInfoList.Items.GetItemById(user.ID);

Foreach(SPField objfld in item.Fields)
{
Console.WriteLine("Field Name:: {0}, Field Internal Name :: {1}",objfld.title,objfld.InternalName);
}

User Information List in SharePoint 2010

Now, we can see the user information list in SharePoint 2010.

User Information List is a hidden list maintained by SharePoint 2010 to stores and maintains a user information profile for authenticated users at the site collection level. A user also can update the profile information from the My Settings link. So for a particular user, there will be only one user profile information across all the sites in the site collection.

The information may be like email, displayname, loginname etc.

You can see the list from the below URL

http://[sitecollection]/_catalogs/users/simple.aspx

or

http://[sitecollection]/_catalogs/users/details.aspx

You can also use the SharePoint 2010 object model to access user information list by using the SPList class like below:

SPList userInformationList = SPContext.Current.Web.SiteUserInfoList;

But if you are using SharePoint Server and you have configured User Profile Service application to import profiles, in that case, the information are copied from User Profile to User Information List by two timer jobs “User Profile to SharePoint Full Synchronization” and “User Profile to SharePoint Quick Synchronization”. Here your profile information can be updated from the Active Directory or from My site feature.

Enable SharePoint User Information List

There are different ways, we can enable sharepoint user information list. By using a browser, SharePoint server object model, csom (client object model), and PowerShell. You can check how to enable SharePoint User Information List.

You may like following SharePoint tutorials:

This SharePoint tutorial, we learned What is User Information List in SharePoint 2013? How to access the User Information List in UI? How to connect with user information list using SharePoint Server side Object Model. And also, we saw, how to get all the fields of User Information List.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

  • >