Lync 2010 User – Unable to Add/Remove Groups or Individual Contacts

This is not a simple issue as there is no clear or easy to find KB article that provides the answer, but here is what I did to fix the issue.

My first thought was to use DbImpExp.exe to get the information from the user’s data in the database. So, I opened a command prompt, navigated to the directory

C:\Program Files\Common Files\Microsoft Lync Server 2010\Support. Once there, I ran the following command:

dbimpexp /user:”” /sqlserver:”SqlCluster1\Instance1″ /hrxmlfile:”d:\russ.xml”

OK, it wasn’t my account that was the problem, but I don’t like sharing user information. Anyway, I then opened up the xml in my favorite editor, Notepad ++. On the second line of the xml (the … is there to show that that cut out a great deal of the xml), you can see the groups. The key issue here is that the last one is 64. It appears that the 64th group tends to cause issues and locks the ability of the user to modify anything in their contacts list.

<HomedResource UserAtHost=”” Enabled=”1″ VersionContact=”1087″ VersionDelegate=”1″ DeploymentLocator=”SRV:” xmlns=””><ContactGroups><ContactGroup Number=”1″ DisplayName=”~” /><ContactGroup Number=”2″ DisplayName=”Some Group Name” /><ContactGroup Number=”3″ DisplayName=”Another Group Name Here” />  …  <ContactGroup Number=”64″ DisplayName=”The Last Group Name” /></ContactGroups><Contacts>

So, you have two options to fix this issue.

  1. Disable the user account, wait a bit, then re-enable the user account. Of course, what will happen is that they will lose all of their entries and will have to start over. Some users would see this as punishment, and some users deserve to be punished. J
  2. Attempt to clean up the xml. I say “attempt” because it is really easy to screw it up.

Cleaning up the xml might be easy for those that are xml experts (not me) and can just jump in and go. I strongly suggest that you make a copy of the xml before you start mucking with it. What needs to be done is that some groups need to be deleted, AND then you need to hunt down the users under the group and remove them, too. For example, if you wanted to remove the third group, then you would need to search the xml for “ 3” and then delete the lines associated. Notice that I included a space before the number. It will make it much easier to find the contact. So, for example:

]]></ContactExtension></Contact><Contact Buddy=”” SubscribePresence=”1″ Groups=”1 3″><ContactExtension><![CDATA[<contactSettings contactId=”e49c869b-9700-444e-a8ad-cc7beee3645d” ></contactSettings>

At this point, I have exported the user’s info and cleaned up the xml. The next step is to get some downtime for the user and disable their account. You need to disable their account and clean it of all contact info so you can import the data back in again. After it has been disabled for a bit, re-enable the user’s account.

The last step is the process is to import the modified content back into the database. Running the following command should do the trick.

dbimpexp /import /hrxmlfile:”d:\russ.xml” /restype:user /user:”” /sqlserver:” SqlCluster1\Instance1″

If all goes well, the user should be able to log into Lync and will get their modified contact information. If it doesn’t go well, you should at least be able to put it back the way it was by importing the backed up copy of the xml.

This entry was posted in Lync. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s