Example Problem
- Domain Name : somecompany.abc.com
- NetBIOS Name of the Domain : SC
- User Profile Service does not properly Sync the Profiles with Active Directory.
- Some of the user names has domain name as SC\AccountName and some of the user profiles loaded as abc\AccountName.
- This is happening when we have two different values in our Active Directory Domain name and NetBIOS name.
- SharePoint User Profile Service is getting confused to get which details during the Sync.
Solution:
Enable NetBIOS Name to use during the Profile Synchronization.
How to Enable NetBIOS Name in SharePoint User Profile Service?
- Delete the Existing User Profile Synchronization Connection.
- Enable The NetBIOS Name in User Profile Service Via PowerShell
- Create New User Profile Synchronization Connection with your Active Directory.
- Run Full Profile Synchronization.
- Run STSADM Command to delete existing data if it is still showing the old data in UPS
1. Delete Existing User Profile Synchronization Connection
- Navigate to SharePoint Central Administration Site.
- CA -> Application Management -> Manage Service Applications – > Select User Profile Service to modify.
- Click Manager Synchronization Connections
- Select the existing connection and select to delete the connection.
2. Enable NetBIOS Name in User Profile Service.
- Open SharePoint Management Shell as Administrator.
- Get the User Profile Service Details
- Type Get-SpServiceApplication and execute.
- Above command will list down all the Service applications of the Farm.
- Select the UPS Application which you need to modify and copy the GUID of the service.
- Get the User Profile Application in to variable
- Type below command and execute
$UPS = Get-SpServiceApplication –identity “GUID”;
$UPS. NetBiosDomainNamesEnabled = $True;
$UPS.Update();
As a practice I used to restart the server (if Possible) once I do this kind of a modification.
Or else at least do a service restart and IIS Reset of the server which UPS is configured to run.
3. Create new User Profile Sync Connection.
- Navigate to SharePoint Central Administration Site.
- CA -> Application Management -> Manage Service Applications – > Select User Profile Service to modify.
- Create New Connection with your active Directory.
NOTE: Make sure you have granted the Replicate Directory Permissions to your UPS Synchronization Account in your Active Directory.
Once everything above is completed, start a Full Profile Synchronization.
For some schnarios even after full Synchronization completed, it is not showing the Updated Accounts in AD.
In this kind of a situation, you need to execute below STSADM Command
Stsadm.exe -o deleteolddatabases 0