TFS Code Review - Multiple Users with Same Display Name Issue

The issue arises when a user has multiple accounts created/deleted in TFS over a period of time and even though the user has only one active account (the other accounts are marked as inactive in TFS), the Code Review module will present this error if the Display Name on the account is the same for any of the user's records in tbl_Identity:

Image1

 

 

 

 

 

 

 

 

This SQL script will verify if the user account is the same in the tbl_Identity within the TFS_Configuration database. Compare the values in the DisplayName field for the user:

select * from tbl_Identity with (nolock) where DisplayName like '%<replace with user name%'

 

Resolution:

The user account appearing the dialog (One having the Code Review assigned to them) log into TFS through the web browser and change their Display Name. Meaning, their user account name appears in this dialog:

Image2

 

 

 

 

 

 

 

On upper right in the blue bar is the user's profile, select the user's name

Image3

 

 

 

 

Select My Profile Image4

 

 

 

 

 

 

 

Select Edit on the Display Name

Image5

 

 

 

 

 

 

 

 

 

Change the Display Name to a unique value and select Save.

Additional Steps:

The user attempting to create the code review may still see the error message when attempting to assign the code review to the user that just changed their Display Name. The user's old display name is still cached on the local workstation's TFS cache and this cache must be cleared out and rebuilt. The cache is cleared for the user creating the code review.

 

For instance, the user would delete the Cache folder from C:\<users>\AppData\Local\Microsoft\Team Foundation\x.x for all folders under Team Foundation. For instance, my local Visual Studio cache is the following:

Image6

 

 

After the cache is cleared, try to create a new code review and assign to user account in which the Display Name was changed..