SharePoint 2013 - Different Ways To Enable User Information List

Introduction

In this article, we will learn different ways to enable the User Information List in SharePoint 2013.

OK, for those who don’t know what User Information List is it’s one of the lists in SharePoint, provided by Microsoft, which is of great importance. You can find a good description of User Information List on MSDN, yet if explained in brief, I would say -

it’s a list which stored the Users and their information. The information of the users includes details like their Name, Email ID, Display Name, Login Name, Job Title, About User, and Department. Whenever a user is added to the site, he/she appears in the User Information List. The User Profile Services sync the user data into the User Information List from Active Directory.

Why and how this user Information List comes in picture.

There are cases when things don’t seem to work and we start getting Error 401: Unauthorized. Then usually, we go check the user permissions on the site, checking that the permissions are in place. Now, from this point, instead of being clueless, we should check if the user is present in the User Information List. Here comes the question of where to find the User Information List. Well, the User Information List is one of some hidden lists in SharePoint. To view the User Information list, we can follow many different ways.

Ways to fetch User Information List.

One can see the User Information List only if he/she is an Admin.

  1. Accessing via Browser

You can access the User Information List through the browser by navigating to >> /_catalogs/users/simple.aspx

Ex. http://win-eqalhem27jl:7575/sites/one/_catalogs/users/simple.aspx

When accessing the user information list through a browser, the list doesn’t remain in the site contents, it stays there temporarily. So here, I have made an effort to make the user information list stay in the site contents permanently as long as we don’t hide it back.

  1. Showing the list using SSOM (Server Side Object Model)

Code.

  1. static void Main(string[] args) {  
  2.     var siteUrl = "http://win-eqalhem27jl:7575/sites/one/";  
  3.     using(SPSite site = new SPSite(siteUrl)) {  
  4.         using(SPWeb web = site.OpenWeb()) {  
  5.             SPList list = web.Lists["User Information List"];  
  6.             list.Hidden = false;  
  7.             list.Update();  
  8.         }  
  9.     }  
  10. }  

  1. Showing the list using CSOM (Client Side Object Model)

Code.

  1. static void Main(string[] args) {  
  2.     var siteUrl = "http://win-eqalhem27jl:7575/sites/one/";  
  3.     using(ClientContext clientContext = new ClientContext(siteUrl)) {  
  4.         NetworkCredential _myCredentials = new NetworkCredential("administrator""admin@123");  
  5.         clientContext.Credentials = _myCredentials;  
  6.         Web web = clientContext.Web;  
  7.         List list = web.Lists.GetByTitle("User Information List");  
  8.         clientContext.Load(list);  
  9.         list.Hidden = true;  
  10.         list.Update();  
  11.         clientContext.ExecuteQuery();  
  12.     }  
  13. }  

  1. Showing the list using PowerShell

    Code.


    SharePoint

    Final Output

    SharePoint

Note

When you enable the User Information List on the site, it is made available but the icon for the list is not found in the _Layouts. You can see in the above image, I have highlighted the List.

This is an issue with the User Information List in SharePoint 2013, however, it is possible to add a custom image to the list.

I found out that there is this image lsers.gif given as the icon for User Information List. But you can’t find this image in the IMAGES folder inside the 15 hive folder. Check the screenshot below.

SharePoint

Hope this article was helpful.