I'm trying to add a test run by the TFS API from excel.
In one of the field in the excel I got the user who executed the tests.
I want to update it in the server in order to update it I need to get the user as TeamFoundationIdentity
ims = _tfs.GetService<IIdentityManagementService>();
TeamFoundationIdentity UserID = ims.ReadIdentity(IdentitySearchFactor.DisplayName,
userName, ReadIdentityOptions.None);
Please help me to fix it.
Which version of Visual Studio and TFS are you using? I'm using TFS2010 and VS2010 and the following code worked fine for me:
Not sure if the problem is just the initialistation of
IIdentityManagementService
, you could give it a try. I suspect that_tfs
is a valid representation of aTfsTeamProjectCollection