We're having an application in C#, .Net Framework 4.6.1 where we are connecting with TFS team projects to go through recently updated workitems and pass that information to other systems. One of the critical pieces of this application is to associate the 'user' fields of any workitem with its corresponding user in LDAP. For e.g. 'Assigned To', 'Created By', etc.
The current approach that we're having is to get the value for these fields from TFS and query LDAP to get a unique identifier (Alias) for the person. This works fine if the person has not updated his Display Name in TFS and is in the "LastName, FirstName MI." format. However, if the anyone changes their Display Name to anything else, for e.g. "FirstName LastName" or just "FirstName", the LDAP search query fails.
So, is there any workaround to this issue? Does TFS store person specific unique identifier for these fields which can be accessed via querying TFS via code?