I have the following issue inside my SharePoint 2013 farm, regarding usernames' properties.

  1. I have test farm + live farm. both farms are integrated with the same Active directory.
  2. For some users i find that their Names are not the same on both farms. for example i have a username = John Ejohn while on the other farm its name = juhn Ejuhn.. while the user have the same email & account (i got these info from the /_layouts/15/userdisp.aspx page from both farms).

enter image description here

  1. now since on both farms i did not configure the User Profile service, so i can understand that the above issue could have been caused by this scenario; the user accessed certain farm, so a user profile get created for him inside /_layouts/15/userdisp.aspx page, then his username got changed on the AD level, and after that he access the other farm, so his user profile got created. and as a result the user have different Name on both farms, while his email and account are the same.

but my question, now i am planning to create some Content Search Web Parts on both farms, and i am going to specify criteria such as :-


to show items which have the Owner = login user. but i am not sure, will the above comparison be based on the Name, or on the Account or on the GUID? and could the above criteria under certain scenarios (as the scenario i specify above) fail to match the user? if his Name have been changed inside the AD?

1 Answer 1



How to Re-Sync All users from Active Directory? To re-sync all user details, use this PowerShell script:

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
Get-SPUser -Web http://web-app-url | Set-SPUser –SyncFromAD




{User} or {User.Name}

Display name of the user who issued the query. For example, this value can be used to query content of the managed property Author.

  • thanks for your reply. but you did not answer my question regarding how the Content Search web part do the comparison for users ??. for example when i specify something as follow OwnerOWSUSER:{User.Name} inside the content search web-part criteria.. will the search be based on the username or Account or GUID??
    – John John
    Feb 20, 2018 at 0:16
  • 1
    See edit answer.
    – Marko Tica
    Feb 20, 2018 at 11:31
  • thanks for the reply. so this mean if the display name of the user on the /_layouts/15/userdisp.aspx page does not match the updated display name on the AD, then using these criteria inside my content search web part will not work {User} or {User.Name} is this correct? or if the user access a site collection with his updated display name, then his info on the ``/_layouts/15/userdisp.aspx` will get updated too... second point is it more safer to use critiria such as {User.SID} to make sure it will not get changed??
    – John John
    Feb 20, 2018 at 12:06
  • but if it is safer to use {User.SID} ,, then can i extract the SID of the People o Group column?? as seems this criteria will never work, as the People or group column will return display name, while the {User.SID} will return the id of the user as follow:- OwnerOWSUSER:{User.SID}
    – John John
    Feb 20, 2018 at 12:14
  • can you please advice on my above comments.
    – John John
    Feb 21, 2018 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.