SP2013 User Profile Web Service Error

_api/SP.UserProfiles.PeopleManager Web Service Error in User Profile REST API

While we were testing the passive SharePoint farm, Developers started to get this error in their REST API calls.
It occurred during reading the user information through User Profile "_api/SP.UserProfiles.PeopleManager"

I have verified below 

  1. User Profile Service is up and running
  2. user Profile Synchronization Service is successfully running on the App Server
  3. FFM Service successfully running on the server
  4. Profile Synchronization is successfully executed with Active directory 
  5. My sites Web Application is available.
But Still we got below error on the Browser when we try the service URL


This XML file does not appear to have any style information associated with it. The document tree is shown below.
<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

-1, Microsoft.SharePoint.Client.ResourceNotFoundException
<m:message xml:lang="en-US">
Cannot find resource for the request GetProperties.

When I dig in to the ULS Logs I was able to see below detail error messages.

Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.  
 at Microsoft.SharePoint.Portal.WebControls.PropertyImage.RenderControl(HtmlTextWriter writer)  
 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writerICollection children)  
 at Microsoft.SharePoint.WebControls.AjaxDelta.RenderChildren(HtmlTextWriter output)  
 at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)  
 at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)  
 at Microsoft.SharePoint.WebControls.AjaxDelta.Render(HtmlTextWriter writer)  
 at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writerControlAdapter adapter)  
 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writerICollection children)  
 at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)  
 at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)  
 at Microsoft.SharePoint.WebControls.SharePointForm.Render(HtmlTextWriter output)  
 at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writerControlAdapter adapter)  
 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writerICollection children)  
 at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)  
 at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writerControlAdapter adapter)

Finally I was able to identify below specific error message 

SPMicrofeedContext.SetMySiteHostForContext failed System.UriFormatException: Invalid URI: The URI is empty. 
 at System.Uri.CreateThis(String uriBoolean dontEscapeUriKind uriKind)  

 at Microsoft.Office.Server.Microfeed.SPMicrofeedContext.SetMySiteHostForContext()


Based on above Error Message, Finally I have realized issue. 
My sites are not loading for the users.
Because Operations team has re-created the User Profile Service and My Site Web App URL was not mapped in the User Profile Service.

The moment I have specified the My site URL in the User Profile Service Properties, web service Started to work and My sites successfully loaded


Popular posts from this blog

How to Create Host Header to SharePoint Web Application

System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission - User Profile Issue

How to add PDF Icon in SharePoint