TechTips -MOSS 2007 SharePoint People Picker Not Working

TechTips
I have come across another fun MOSS 2007 SharePoint problem, this time it deals with a GUI portion of the popular Microsoft software product called the People Picker. The problem I am running into is that when I search for a user by their name, they don't appear in list of available users in my Domain. This is a common issue that primarily affects people that reside in a multi domain Windows environment. Luckily for us the fix is relatively simple.

So first what causes the people not to show up in the People Picker? Well the way MOSS 2007 SharePoint works with the People Picker, it only looks in the domain that you have installed your instance of SharePoint on. So if you have Domain1 then your People Picker will only search users in Domain1, unless you specifically tell SharePoint to look in other domains. This is where the powerful STSADM command line tools come in handy.

There are many command STSADM command line tools that can be used to configure and manipulate your MOSS 2007 SharePoint Farm. For a whole load of information on STSADM, its uses, and how to do almost anything with the command line tool check out this Microsoft Article.

Since we are going to be using the STSADM command line tool for altering the way our People Picker searches domains, here is a more specific Microsoft Article that references and details the commands we will be using.

So now I will give you the command you will need to run and explain the parts to the command for you and hopefully give you a simplistic how-to so you can easily edit and run the command and hopefully also understand it.

First here is the command line we are going to run

STSADM -o setproperty -pn peoplepicker -searchadforests -pv -url

Don't just copy and paste this command it will not run successfully until you edit it with the information about your sites and domains. So let's break it down to the pieces so we know what we should put where.

So let's edit this to properly search another domain. For this example we will use Domain1 (my primary domain) and Domain2 (the secondary domain I want my People Picker to also see users from). So the first portion of the command line won't need any changes until we hit the symbols, anything inside of these we will need to make specific to our Domain2.

So for -pv "Domain:Domain2.test.test.com"

Then we move on to the last part of the command which is the URL to the site we want to add the secondary domain search to. You need type your SharePoint site URL in the format of "http(s)://HOSTNAME:port" (the s is in parenthesis because you can have either http or https for this depending on your setup) so my code would be -url http://testserver:48392

So now the entire command for my setup will look like this

STSADM -o setproperty -pv -pn "peoplepicker -searchadforests" -url "http://testserver:48392"

Then in order to run the STSADM command you need to be in the right location. You will need to open a command prompt and go to the folder C:\program files\common files\microsoft shared\web server extensions\12\bin (If you made changes to the installation location this might be changed).

Type your command line that we created using the right parameters and hit enter. The command line will basically go through the entire Domain2 and put the users into the People Picker within SharePoint. Then when you do a search you will be able to find users from the secondary domain. This can take some time depending on the size of the Domain and the number of users it contains. Once it completes it should tell you that it succeeded, if it failed check your code and try it again. Also remember that you will need an account that has rights to any and all Domains you are trying to add via this STSADM command line tool. If you don't have rights the code is going to fail, so make sure you have rights to perform the action first.

You can also specify an account that has rights to the domain you are scanning by adding the username and password to the end of the command line we just created. It would look something like this

STSADM -o setproperty -pv -pn "peoplepicker -searchadforests" -url http://testserver:48392, ,

Of course substitute your username and password for the two commands in . Well I hope you are able to get your People Picker working properly across many domains. This can be a real challenge to get working properly but once you do it will help you add users from all the domains in your environment.

Sources

Microsoft Technet Article - Peoplepicker: Stsadm properties (Office SharePoint Server)

http://technet.microsoft.com/en-us/library/cc263318.aspx

Microsoft Technet Article - Stsadm command-line tool (Office SharePoint Server)

http://technet.microsoft.com/en-us/library/cc261956.aspx

Published by TechTips

I am a senior systems engineer and enjoy writing articles about computers, technology and other electronics.  View profile

To comment, please sign in to your Yahoo! account, or sign up for a new account.