Saturday, July 17, 2010

Changing identities in TFS 2010

Changing identities in TFS 2010 is a lot harder than you should think at first. There are some things you need to keep in mind while updating identity information inside your TFS environment.

As identity information is stored in a lot of places in TFS, some tools are available to help you. In TFS 2008, identity change was accomplished by running the TFSAdminUtil Sid command. In TFS 2010 this functionality moved into the TFSConfig Identities command.

Some considerations:

  1. Target account restriction - the target account of the mapping should not already exist in TFS. This is a key restriction of TFSConfig Identities , as well as the older TFSAdminUtil Sid. If the target account is somehow introduced, either by being granted permissions or by group membership sync, it cannot be undone. Simply "removing" the user from group(s) will not work. Removing identities in TFS simply marks the record as logically deleted, and does not physically delete because the identity may own TFS artifacts such as changesets or work items.
  2. Batch versus individual mode - if account names are the same in both domains, the command can be run in batch mode. Otherwise identities can changed individually, specifying a different target account name.
  3. Identity source - if the identity was directly added to a TFS group, running the Identity Change command is sufficient. For accounts which were picked up by TFS by syncing AD groups, the source of the data should also reflect the change.
  4. Sync update - after running the identity change command, the next hourly sync will update all properties.

No comments: