Posts Tagged ‘infopath’

Performance problems with InfoPath Form People Picker resolving names from AD

November 2, 2011 Leave a comment

I encountered an issue where the time to resolve a name from AD in an InfoPath Browser Form People Picker control was taking upwards of 30 seconds, when previously it only took 2-3 seconds.  After further investigation, there appeared to be an issue with a recent change to AD that was causing this performance issue.   AD has approximately 13K user objects in one forest.  And under this current configuration the form would resolve the name in 2-3 seconds.

The problem started to surface last week when the organization began preparing for a merger with an organization of similar size (roughly 13K user objects in their forest).   A two way trust was setup between the two forests in preparation for getting email and calendars working for both organization today.  As you can imagine the communication of these changes and their impact hadn’t been communicated to all potential parties that might be affected by this change.  Subsequently, it was brought to our attention by the user community of the InfoPath forms that they were taking so long to resolve names in the people picker control.  After some searching around to diagnose the issue, we happened upon something I had used in a previous project which is to update the property on SharePoint using stsadm – setsiteuseraccountdirectorypath.  After setting this property we actually saw an improvement in the time from the original 2-3 seconds to not quite 1/2 second.  Who knew the fix would actually improve the previous time.

Below is the script used to make this update.  Of course you only need the stsadm line but if you have more than one site to fix or could see benefit to using this in the future the script below can be saved as a batch file.  You’ll also need to update the ‘-path’ to the OU where you users are located in AD.  And if you need to reset the property just set the ‘-path’ to “” which will return the setting to the default which is configured out of the box.

@echo off
echo Path of site collection with the people picker that needs fixing:
set /P siteURL=

echo Fixing the people picker…

stsadm -o setsiteuseraccountdirectorypath -url %siteURL% -path “ou=NAME OF OU,dc=DOMAIN NAME,dc=com”

echo People picker fixed.

Hopefully this helps someone else out there.  Thankfully it only burned a couple of hours of time this morning which could have led to a more exhaustive exercise with the AD team who was already plenty busy getting email and calendaring working for 26K users vs. 50-100 users who have to wait for a simple little people picker in a handful of InfoPath forms.

UPDATE:  11/18/11

There is another script you can use if you want to add more than one OU. 

stsadm -o setproperty -pn “peoplepicker-serviceaccountdirectorypaths” -pv “ou=OU1,ou=OU2,dc=domainname,dc=Extension” -url http://server:port/sitecollection