How to avoid “The directory data type cannot be converted to/from a native DS data type” (0x8000500C) in managed code

Hello everyone, We may find ourselves in the situation where we need to access custom properties that have been defined for objects in our Active Directory. However, using the managed class DirectoryEntry we may receive an exception with the error code 0x8000500CL when accessing the custom property the following way: myDirectoryEntry.Properties[“myProperty”] As the error text…

2