Strange things are no stranger to SharePoint !!. I am writing this post after banging my head for few hours trying to fix some strange behaviour in one of my SharePoint anonymous sites.
In one of my anonymous sites all the new users who visit the site after signing in was shown their login name instead of the display name in the welcome menu on top right corner.
Now the first instinct was to point fingers on the User Profile service, but guess what User Profile had the correct display name. Moreover I had another anonymous site in another Web application for which , whenever a new user who does not have any permission signs in , the user can see his/her display name. In SharePoint user display name on the welcome menu is fetched from Site User Information List of the particular site. So now the issue was clear, somehow in my anonymous site , the new users were not getting added to Site User Information List.
Luckily for me since I had another anonymous site which did not have this issue, I could do some comparison between the sites.
After spending some time , I noticed that in my working anonymous site “Everyone” group is present in the Site User Information List , but it’s not present in my other Anonymous site with the issue. So I added “Everyone” to Visitors SP Group. Now the “Everyone” group is added to Site User Information List. Voila and new users do not see their login name but see their display name instead.( PS: Do not forget to remove access rights given to “Everyone” from the visitors SP group after this.)
After doing some research, i found that by default the “Everyone” group will be added to Site User Information List in all anonymous SharePoint sites. Due to some reason it was not added in my site.
The possible root cause:
The sites with this problem were migrated sites from 2010 and visually upgraded. SharePoint 2010 had NT Authenticated Users group and SharePoint 2013 has its equivalent Everyone. So after migration the NT Authenticated Users group might not have been getting converted properly.