I'm trying to load the attribute physicalDeliveryOfficeName from a DirectoryEntry which is returned by the GetUnderlyingObject method of a UserPrincipal instance:
DirectoryEntry directoryEntry = principal.GetUnderlyingObject() as DirectoryEntry;
which means that the following statement returns false:
directoryEntry.Properties.Contains("physicalDeliveryOfficeName");
I know that this property can be loaded by adding the name to the StringCollection DirectorySearcher.PropertiesToLoad when using said DirectorySearcher.
My questions are, why doesn't the DirectoryEntry returned by the method GetUnderlyingObject contain all properties? And how can I load this property without using a DirectorySearcher?