Everything You Need To Know About User Information List In SharePoint

In SharePoint, you can access the User Information List to get basic data about a user. This list is hidden and there’s no direct link provided by Microsoft to access the list. Let’s see how we can access this list and what all the data we can get from the User Information List. 
 

User Information List - Important Information

  • The user Information list is hidden, and users don’t have any direct link to access it.
  • User Information List contains data about the user added as part of their Active Directory (AD) profile configuration
  • User Information List resides only in Root Site Collection.
  • Whenever you grant access to the user on SharePoint site/list or any other resource, the user automatically gets added in this list.
  • When any user modifies or creates any list or library object, the item gets saved with last modified by/created by metadata. This information is taken from User Information List.
  • If any AD Group is given permission on site, the group will also be added to the User Information List and also the Group-users will be added to the list.
  • You can access User Information list only if you are an Admin of the site.

URL to access the User Information list?

 
You can enter the URL in browser to access the list directly. You can see the difference in both the screenshots.
  • https://SiteURL/_catalogs/users/detail.aspx - Get detailed information for users
  • https://SiteURL/_catalogs/users/simple.aspx - Get basic information for users
Access SharePoint User Information list using REST API
  1. function GetAllFieldsFromList() {  
  2.     $.ajax  
  3.         ({  
  4.             // _spPageContextInfo.webAbsoluteUrl - will give absolute URL of the site where you are running the code.  
  5.             url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('User Information List')/fields",  
  6.             method: "GET",  
  7.             headers:  
  8.                {  
  9.                    "Accept""application/json;odata=verbose"  
  10.                },  
  11.             success: function (data, status, xhr) {  
  12.                 var dataresults = data.d.results;  
  13.                 for (var i = 0; i < dataresults.length; i++) {   
  14.                     console.log(dataresults[i]["Title"]);  
  15.                 }  
  16.             },  
  17.             error: function (xhr, status, error) {  
  18.                 console.log("Failed");  
  19.             }  
  20.         });  
  21. }  
Access SharePoint User Information list using CSOM
  1. using Microsoft.SharePoint.Client;  
  2. using System.Linq;  
  3. using(ClientContext clientContext = new ClientContext("http://MyServer/sites/MySiteCollection")) {  
  4.     List targetList = clientcontext.Web.SiteUserInfoList;  
  5.     FieldCollection oFieldCollection = targetList.Fields;  
  6.     clientcontext.Load(oFieldCollection, oFields => oFields.Include(field => field.Title));  
  7.     clientcontext.ExecuteQuery();  
  8.     foreach(Field oField in oFieldCollection) {  
  9.         Console.WriteLine("Field Name- " + oField.Title);  
  10.     }  
  11. }   
Please let me know if you want some more information related to the User Information List. I will try to cover that in the article.