Answered by:
Error was encountered while retrieving the user profile for SHAREPOINT\system account

Question
-
All, I got the following error while viewing one of our sharepoint frontend server event viewer:
Error while getting user: SHAREPOINT\system.An error was encountered while retrieving the user profile. - The details are below:
Type: Microsoft.Office.Server.UserProfiles.UserNotFoundException
Function: Microsoft.Office.Server.UserProfiles.Cache.UserData GetUserData(Microsoft.Office.Server.UserProfiles.UserProfileManager, System.Nullable`1[System.Int64], System.Guid, System.String, Byte[], System.String, Boolean)
Source: Microsoft.Office.Server.UserProfiles
Message: An error was encountered while retrieving the user profile.
Time: 1/13/2016 12:27:45 PMCustom Message:
Stack Trace: at Microsoft.Office.Server.UserProfiles.UserProfileCache.GetUserData(UserProfileManager objManager, Nullable`1 recordId, Guid gAcct, String strAcct, Byte[] bSid, String strEmail, Boolean doNotResolveToMasterAccount)at Microsoft.Office.Server.UserProfiles.UserProfile.RetrieveUser(String strAcct, Guid gAcct, Byte[] bSid, Nullable`1 recordId, Boolean doNotResolveToMasterAccount, Boolean loadFullProfile, Boolean loadColleagueRecordIds, String strEmail)
at Microsoft.Office.Server.UserProfiles.UserProfile..ctor(UserProfileManager objManager, String strAcct, Boolean doNotResolveToMasterAccount, Boolean forceUserIsSelf, Boolean loadFullProfile, Boolean loadColleagueRecordIds, String strEmail)
at Microsoft.Office.Server.UserProfiles.UserProfileManager.GetUserProfile(String strAccountName, Boolean doNotResolveToMasterAccount, Boolean loadFullProfile, Boolean loadColleagueRecordIds)
at Microsoft.Office.Server.UserProfiles.UserProfileManager.GetUserProfile(String strAccountName, Boolean doNotResolveToMasterAccount)
at Microsoft.Office.Server.UserProfiles.UserProfileManager.GetUserProfile(String strAccountName)at Gilead.Core.Helpers.UserProfileHelper.GetCurrentUser(SPSite site, String userLoginName)
I am wondering how this error occurred either by clicking on "SHAREPOINT\system" account from user information list or from user profile import. How can I fix this issue and what is the root causes?
Thanks
--------------------------------Here is the raw error log file -----------------------------------------
01/13/2016 12:25:13.81 w3wp.exe (0x5690) 0x5494 SharePoint Portal Server User Profiles ajk37 Medium MossClientBase_WCFLogging:: MossClientBase.ExecuteOnChannel -
Executed codeblock on channel 6bed549d-5bdc-6037-e6d4-a9ed99de6299
01/13/2016 12:25:13.81 w3wp.exe (0x5690) 0x5494 SharePoint Portal Server User Profiles ajk4a Medium UserProfileDBCache_WCFLogging::End
ProfileDBCacheServiceClient.GetUserData.ExecuteOnChannel 6bed549d-5bdc-6037-e6d4-a9ed99de6299
01/13/2016 12:25:13.81 w3wp.exe (0x1088) 0x3070 SharePoint Foundation Monitoring nasq Medium Entering monitored scope (ExecuteWcfServerOperation). Parent No
01/13/2016 12:25:13.81 w3wp.exe (0x5690) 0x5494 Unknown ACMECompany.Core.Repository 10040 Unexpected Error while getting user: SHAREPOINT\system. An error was encountered while retrieving the user profile. - The details are below: Type: Microsoft.Office.Server.UserProfiles.UserNotFoundException Function: Microsoft.Office.Server.UserProfiles.Cache.UserData GetUserData
(Microsoft.Office.Server.UserProfiles.UserProfileManager, System.Nullable`1[System.Int64], System.Guid, System.String, Byte[], System.String, Boolean) Source: Microsoft.Office.Server.UserProfiles Message: An error was
encountered while retrieving the user profile. Time: 1/13/2016 12:25:13 PM Custom Message: Stack Trace: at Microsoft.Office.Server.UserProfiles.UserProfileCache.GetUserData(UserProfileManager
objManager, Nullable`1 recordId, Guid gAcct, St... 6bed549d-5bdc-6037-e6d4-a9ed99de6299
01/13/2016 12:25:13.81* w3wp.exe (0x5690) 0x5494 Unknown ACMECompany.Core.Repository 10040 Unexpected ...ring strAcct, Byte[] bSid, String strEmail, Boolean
doNotResolveToMasterAccount) at Microsoft.Office.Server.UserProfiles.UserProfile.RetrieveUser(String strAcct, Guid gAcct, Byte[] bSid, Nullable`1 recordId, Boolean doNotResolveToMasterAccount, Boolean loadFullProfile, Boolean
loadColleagueRecordIds, String strEmail) at Microsoft.Office.Server.UserProfiles.UserProfile..ctor(UserProfileManager objManager, String strAcct, Boolean doNotResolveToMasterAccount, Boolean forceUserIsSelf, Boolean loadFullProfile,
Boolean loadColleagueRecordIds, String strEmail) at Microsoft.Office.Server.UserProfiles.UserProfileManager.GetUserProfile(String strAccountName, Boolean doNotResolveToMasterAccount, Boolean loadFullProfile, Boolean
loadColleagueRecordIds) at Microsoft.Office.Server.UserPr... 6bed549d-5bdc-6037-e6d4-a9ed99de6299
01/13/2016 12:25:13.81* w3wp.exe (0x5690) 0x5494 Unknown ACMECompany.Core.Repository 10040 Unexpected ...ofiles.UserProfileManager.GetUserProfile(String strAccountName,
Boolean doNotResolveToMasterAccount) at Microsoft.Office.Server.UserProfiles.UserProfileManager.GetUserProfile(String strAccountName) at ACMECompany.Core.Helpers.UserProfileHelper.GetCurrentUser(SPSite site, String userLoginName)
6bed549d-5bdc-6037-e6d4-a9ed99de6299Thursday, January 14, 2016 12:26 AM
Answers
-
It looks like you have custom code enumerating user profiles ("ACMECompany.Core.Repository"). Your custom code should probably exclude built-in identities (and likely other select accounts, such as service accounts). At any rate, this isn't a SharePoint problem per se, but rather a custom code issue that needs to be brought to the developer's attention.
Trevor Seward
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
- Proposed as answer by Victoria Xia Friday, January 22, 2016 1:38 AM
- Marked as answer by Victoria Xia Thursday, January 28, 2016 9:35 AM
Thursday, January 14, 2016 2:02 AM
All replies
-
It looks like you have custom code enumerating user profiles ("ACMECompany.Core.Repository"). Your custom code should probably exclude built-in identities (and likely other select accounts, such as service accounts). At any rate, this isn't a SharePoint problem per se, but rather a custom code issue that needs to be brought to the developer's attention.
Trevor Seward
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
- Proposed as answer by Victoria Xia Friday, January 22, 2016 1:38 AM
- Marked as answer by Victoria Xia Thursday, January 28, 2016 9:35 AM
Thursday, January 14, 2016 2:02 AM -
Awesome, thanks.Thursday, January 14, 2016 4:27 PM