I’m using DirectoryEntry to access Active directory inside my Company.
We have 2 OrganizationUnit OU1 and OU2.
We have 2 uers:
- User1 is enabled for OU1
- User2 is enabled both for OU1 and OU2.
I’m logged in Windows with User1, and I need to use User2 to get from Active Directory the list of the Company Users, including both OU1 and OU2.
I’ve used DirectoryEntry constructor with Username, Pwd and AuthType, where I pass User2,
public DirectoryEntry (string path, string username, string password, System.DirectoryServices.AuthenticationTypes authenticationType);
I expected to acquire User2 credentials for getting Users of both the Organization Units, but I continue to retrieve only users for OU1.
I’ve tried also differenct combination for parameter authenticationType but nothing has changed.
Have you any suggestion?