Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I tried many things:
1) tLdapInput objectSid as Object -> serialize as byte[] -> convert to string
2) tLdapInput objectSid as byte[] -> convert to string
It did not work until i set the Advanced "binary" setting! Many thanks @jjzhou!
I was then able to get tLdapInput objectSid as byte[] and run routine method to convert to SID string.
The method convertSidToStringSid from https://miromannino.com/blog/convert-a-sid-to-string-with-java/ works. Similarly as do
LdapUtils method convertBinarySidToString(byte[] sid) (ref: https://docs.spring.io/spring-ldap/docs/current/apidocs/org/springframework/ldap/support/LdapUtils.h...)
These are the Routine Libraries i used, and some import statements.and routine method definition.
spring-ldap-core-2.3.2.RELEASE.jar
spring-core-4.3.10.RELEASE.jar
sl4j-log4j12-1.7.6.jar
sl4j-api-1.7.6.jar
sl4j-jdk14-1.6.1.jar
import org.springframework.ldap.support.LdapUtils;
import org.springframework.core.*;
import org.slf4j.*;
public static String convertBinarySidToString(byte[] sid){
String sidStr = LdapUtils.convertBinarySidToString(sid);
return sidStr;
}