Posts

Showing posts with the label WCF Service

SharePoint People Search

Searching of all user profiles in SharePoint 2013 by WCF CSOM service. In SharePoint for searching users by CSOM can be performed by writing the below code by creating a WCF service. Note:  1. 'MethodResponse' is a custom object to store list of string 2. 'token' is a unique string to verify stored UserCredentials public MethodResponse<List< string >> GetPeoples( string text, string token) { MethodResponse<List< string >> response = new MethodResponse<List< string >>(); List< string > lstMetadata = new List< string >(); UserCredential userCredential = new UserCredential(); try { userCredential = VerifyToken(token); if (userCredential != null ) { _ctx = GetClientContext(userCredential); if (_ctx != null ) { ...