0
votes

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?

1
Is that your local application? - Oxoron
Oxoron - For development, the application is run locally but for production, it is hosted on a different server. - Vishal
I see you work in a large company. Follow the answer of Patrick. - Oxoron

1 Answers

0
votes

Fields with username values like the AssignedTo field are stored in the TFS database as a reference to an identity, not simply as the display name.

However, directly querying the list of accounts by display name is not supported. As a workaround, you could dig into the account list and match the display name to an identity. That identity has your AccountName. How to do this through code you could take a look at below blogs: