I use a console application to write some test code:
/// /// Returns AD information for a specified userID. /// /
If its an intranet application that uses windows authentication, then you can wrap your AD call in a impersonation-context of the user.
Something like:
using (((System.Security.Principal.WindowsIdentity)User.Identity).Impersonate()) { // Do your AD stuff here }