I would like to convert the SID\'s System.Byte[] type to a String.
My code:
string path = \"LDAP://DC=abc,DC=contoso,DC=com\"; DirectoryEntry entry = new
After load the property in directoryEntry ....
var usrId = (byte[])directoryEntry.Properties["objectSid"][0]; var objectID = (new SecurityIdentifier(usrId,0)).ToString();