Use peoplepicker-searchadcustomquery to restrict people picker results
Hi all, I am trying to restrict the people picker results with the stsadm command stsadm -o setproperty -pn peoplepicker-searchadcustomquery, but I can't get it to work. What I want to achieve ist the following: I have multiple trusted domains. I want to be able to search in all the domains (which is already possible), but in one domain no group selection should be possible. So I wanted to try the following as a first step: restrict the people picker of a testserver to show only the users of my domain (no groups). I used the following command: stsadm -o setproperty -pn peoplepicker-searchadcustomquery -pv "(&(userPrincipalName=*@test.local)(objectClass=user))" -url http://testapp The query worked when testing it with ldp.exe, but in SharePoint it has no effect. The groups are still found. I also did iisreset. Is there anything else I have to do? Is my query wrong or is it not possible to restrict the query using this stsadm property? Please help! Thx in advance, Mel
November 8th, 2010 9:54am

Hi Mel, Maybe you can try the following command again (without double quotation marks). stsadm -o setproperty -pn peoplepicker-searchadcustomquery -pv (&(userPrincipalName=*@test.local)(objectClass=user)) -url http://testappBest regards. Emir
Free Windows Admin Tool Kit Click here and download it now
November 11th, 2010 5:52am

Hi Emir, I tried it without quotation marks, but then I get the following error message: (objectClass was unexpected at this time. I didn't get this to work with peoplepicker-searchadcustomquery, instead I used peoplepicker-searchadcustomfilter. Although the documentation says that the filter is only applied in the search dialog and not in "Check Names". That's why I didn't try that in the first place. But in my tests it worked for both cases. If there is a possibility to get peoplepicker-searchadcustomquery to work, I would be interested nevertheless. Does anybody really know what the difference between these two properties is? Thx, Mel
November 18th, 2010 3:25am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics