Tuesday, 29 January 2013

Claims to Windows Token Service - Unexpected Claims Authentication Exception

The following error is found in SharePoint 2010 ULS Log / Developer Dashboard
Exception Message: Claims to Windows Token Service - Unexpected Claims Authentication Exception

Details: Claims Authentication Unexpected g220 No windows identity for [domain]\[user] Call stack:
at Microsoft.SharePoint.Administration.SPFarm.CurrentClaimsUserIsBoxAdministrator(IClaimsIdentity identity) at Microsoft.SharePoint.Administration.SPFarm.CurrentUserIsBoxAdministrator() at Microsoft.SharePoint.Administration.SPWebApplication.CurrentUserIgnoreThrottle() at Microsoft.SharePoint.SPManagedCodeInterop.CanCurrentUserIgnoreThrottle(Guid siteId) at Microsoft.SharePoint.Library.SPRequestInternalClass.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter pCallback, Object& pvarColumns) at Microsoft.SharePoint.Library.SPRequest.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter pCallback, Object& pvarColumns) at Microsoft.SharePoint.SPWeb.GetSiteData(SPSiteDataQuery query) at SiteDataQuery.VisualWebPart1.VisualWebPart1UserControl.GetDataUsingContentType(UInt32 rowLimit, SPWeb web) at SiteDataQuery.VisualWebPart1.VisualWebPart1UserControl.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.AddedControl(Control control, Int32 index) at SiteDataQuery.VisualWebPart1.VisualWebPart1.CreateChildControls()
Pre-conditions: 

  • SharePoint Web Application uses Claims-based Authentication 
  • Current log in user is not added to any group of the current server (Windows Identity Not Found) 
  • Claims to Windows Token Service is Stopped in the Central Administration Site. 


Resolution: Turn on Claims to Windows Token Service in Central Administration Site

Root Cause: unknown yet. Trying to get some information/documentation from Microsoft.

Possible cause: It is the way SharePoint works internally. The web part code tries to get SharePoint site data (e.g SPSiteDataQuery), SharePoint tries to determine if List View Threshold is reached / CanCurrentUserIgnoreThrottle. Then the exception is thrown if SPFarm could not determine / convert Windows token to Claims token. Note that the web part still return enough data. Just some annoy exceptions in ULS/Developer dashboard as above