"Object reference not set to an instance of an object" while accessing Active Directory information from TFS Source Control Explorer
This article provides help to solve an error that occurs when you access Active Directory information from Team Foundation Server Source Control Explorer.
Original product version: Windows Server 2012 R2
Original KB number: 957969
RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.
Create a Windows group in Active Directory (AD), and assign AD users to the group, then...
- Open Visual Studio as a TFS Administrator
- Open "Source Control Explorer"
- Right+click on a version control folder and select Properties
- Click the Security tab on the Properties dialog
- Select the "Windows User or Group" option and click the Add button
- Browse for the AD group; and attempt to add the group
Error: Object reference not set to an instance of an object.
This issue is caused by a bug in the version control permission dialog window in Visual Studio 2008 \ Team Explorer 2008.
This problem is resolved in Visual Studio 2008 SP1. If you are using Visual Studio 2008 RTM, there are two workarounds:
- Assign version control permissions with commandline tool: tf.exe
You can enter "tf perm /?" or review the MSDN documentation for this command TF Permission command for more information about how to assign version control permissions from command line.
- Explicitly make the AD group in question a valid TFS identity:
a. Create a new user group on the server. b. Add the AD group in question to this group. c. You should now be able to assign version control permissions to the AD group.
MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE "MATERIALS") FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.