UserName showing up as DomainName\UserName instead of Full Name in SharePoint 2010
I have seen a lot of people facing a problem in SharePoint 2010, where the UserName is displayed as DomainName\UserName instead of its Full Name. As a solution a lot of people are suggesting to setup the User Profile Synchronization service, but there are organizations who would not like to use it just to fix this issue.
The above image shows that my UserName which was supposed to be displayed as Mukesh Parmar is shown as SharkHeads\Mukesh. This is not right & I would like it to be displayed correctly and without installing and configuring User Profile Synchronization Service.
Let’s Start
The fact is you really do not need to setup User Profile Synchronization service, just to show the user’s display name right. We can utilize the existing SharePoint 2010 CMDLet Set-SPUser to set the User Properties in SharePoint or force a Manual User Profile Update from AD [Active Directory].
To change the Display Name we will be using the Set-SPUser CMDLet with the following switches.
Set-SPUser -Identity ‘SharkHeads\Mukesh’ -DisplayName ‘Mukesh Parmar’ –Web https://SharePointServer
Or [To force a manual sync for the user properties from AD]
Set-SPUser -Identity ‘SharkHeads\Mukesh’ –Web https://SharePointServer –SyncFromAD .
Change the above user details as per your environment. Once the command is successfully executed, the changes should now reflect on the site as seen below.
You might be thinking, by using the above CMDLet, I can only change one user DisplayName at a time, I have around 100’s of users having the Displayname in the following format DomainName\UserName. How do I fix those?
No need to panic you can use the following to do the same.
Get-SPUser –Web https://SharePointServer | Set-SPUser –SyncFromAD
The above will fix all users display name in that particular Web Application.
Note
Below are few point to consider:-
- When using –SyncFromAD switch, make sure that the Display Name field is set correctly in User Properties of Active Directory.
- This is not an ideal solution if you are frequently adding new users and changing the user properties in AD. Tho you can schedule the above in Task Scheduler as per your requirement.
- The above will not fix the Display Name for all Web Application in your farm, you will need to run the above command separately for all sites or create a script for the same or you can setup the User Profile Synchronization Service.
- For a full list of switches for the Set-SPUser CMDLet you can check the following link.
12 thoughts on “UserName showing up as DomainName\UserName instead of Full Name in SharePoint 2010”
Joeri
December 14, 2010In the beginnin we had aboud 80% of the names showing domain/user. the other 20% was showing full name.
After running the mentioned script “Get-SPUser –Web http://SharePointServer | Set-SPUser –SyncFromAD” all usernames are showing up as full names. But after a couple of minutes the usernames are changed back to domain/user.
How to fix this problem forever?
Brainfreeze
December 21, 2010I have a problem very similar to what you describe, except I am using forms authentication. Some of the users display name shows the authentication provider similar to this: i:0#.f|fbaprovider|username I would like SharePoint to only display username. Can your instructions be used to fix this issue? Obviously I wouldn’t need the -SyncFromAD switch, is their another to sync from an ASP.NET user db?
Nuno Santos
January 21, 2011Hi, do you know if there is something similar to change de preferredName profile property?
N i T ! N
February 8, 2011great solution!!!
Andrei Drynov
March 7, 2011Mukesh, that is something I’ve been searching for for ages.
Thank you very much!
Joel Palmer
April 3, 2011Thanks! Worked like a charm!
Super-Star
April 18, 2011Great Post! It sure solved my problem. Congrats!
Roland
May 18, 2011Really, not working… I use
Get-SPUser –Web http://SharePointServer | Set-SPUser –SyncFromAD
, but get all errors he cannot retrieve name or e-mail address of every user.
It is about users from another domain (trusted one way), but profile import is working like a charm.
SharePoint…
Geetha
July 19, 2012It works like magic………….
Though u get a lot of errors showing “cannot retrieve name or e-mail address” , the usernames are synchronized, try creating a column with user datatype and see the difference.
All the names displayed as domainusername will change to fullnames
Geetha
Cristina Mayer
May 18, 2013Thanks for sharing your info. I truly appreciate your efforts
and I will be waiting for your next post thank you once again.
Khaled EL Sheikh
November 7, 2013Perfect 😉
compro oro
November 11, 2013WOW just what I was searching for. Came here by searching for silver bullion
Leave a reply