In this blog, we will see how to edit the default User Profile List. By default, SharePoint does not provide a direct way to edit this hidden list.

Accessing the User Profile List

https://RKSite.com/teams/RKDevSite/_catalogs/users/detail.aspx
<<Site Url>>/_catalogs/users/detail.aspx

Steps to edit the User Profile List
  1. Get the GUID of the list.
  2. Form the URL to edit as a normal list.
Step 1

The below CSOM application code will help you in getting the GUID of the User Profile List. Create a console application and add CSOM NuGet package and replace the below code in Program.cs file.
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Security;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using Microsoft.SharePoint.Client;
  8. namespace UserProfileList {
  9. class Program {
  10. static void Main(string[] args) {
  11. string siteUrl = "https://RKSite.com/teams/RKDevSite";
  12. using(ClientContext context = new ClientContext(siteUrl)) {
  13. SecureString securePassword = GetSecureString( << Password >> );
  14. context.Credentials = new SharePointOnlineCredentials( << UserName >> , securePassword);
  15. List oList = context.Web.SiteUserInfoList;
  16. CamlQuery camlQuery = new CamlQuery();
  17. context.Load(oList);
  18. context.ExecuteQuery();
  19. Console.WriteLine(oList.Id);
  20. }
  21. }
  22. public static SecureString GetSecureString(string userPassword) {
  23. SecureString securePassword = new SecureString();
  24. foreach(char c in userPassword.ToCharArray()) {
  25. securePassword.AppendChar(c);
  26. }
  27. return securePassword;
  28. }
  29. }
  30. }
Step 2

Once you get the GUID, build the URL as below.

https://RKSite.com/teams/RKDevSite/_layouts/15/listedit.aspx?List=77dffdaa-e518-1234-a1e4-8bb568fa22b6
<<SiteUrl>> /_layouts/15/listedit.aspx?List=<<ListGUID>>

Here, the highlighted code is List GUID. Hope this blog will help you in coding.