Skip to main content

Posts

Showing posts from July, 2019

Read all the SharePoint User profile field using CSOM

The article shows CSOM and C# code to read all the user profile field. create a console application and copy the code below and replace the siteurl, user id and password with your sharepointURL , user id and password. You need to add three dll to run this code:- Microsoft.SharePoint.Client Microsoft.SharePoint.Client.Runtime Microsoft.SharePoint.Client.UserProfiles Add this dll and run the code. Enjoy Coding. using System; using Microsoft.SharePoint.Client; using Microsoft.SharePoint.Client.UserProfiles; using System.Security; namespace ConsoleApp1 {     class Program     {         static void Main()         {             using (ClientContext clientContext = new ClientContext(Yoursiteurl))             {                 string UName = "Your user name";                 string Upassword = "Password";                 SecureString SecurePassword = GetSecureString(Upassword);                 clientContext.Credentials = new SharePointOnlineCrede

SharePoint user profile fields with their internal name.

We can update the SharePoint user profile fields manually or programmatically. Also using a power shell, we can update the user profile fields. For updating the SharePoint user profile field need to enable the  Allow users to edit values for this property, SharePoint Admin can enable this property. Display Name  Actual Name Type Id UserProfile_GUID Unique Identifier SID SID binary Active Directory Id ADGuid binary Account name AccountName Person First name FirstName string single value Phonetic First Name SPS-PhoneticFirstName string single value  Last name LastName string single value Phonetic Last Name SPS-PhoneticLastName string single value Name PreferredName string single value Phonetic Display Name SPS-PhoneticDisplayName string single value Title Title string single value Manager Manager Person  Pic