I have an AD filled with test data. I have automated tests that query this AD. I would quite like to be able to run these tests from anywhere, including outside of the domain.
I have seen the question Should I expose my Active Directory to the public Internet for remote users?. I don't really care about the shoulds, it's test data and my security requirements are minimal.
How do I set up my AD to be universally accessible?
I'm using the System.DirectoryServices
libary to query the AD if that matters.
using (var directoryEntry = new DirectoryEntry("LDAP://...", "username", "password"))
using (var searcher = new DirectorySearcher(directoryEntry, "(givenName=*)", new[] { "attributeOfInterest" }))
{
return searcher.FindAll();
}