<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: [resolved] tLdapInput : decoding the objectSID Attribute in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210449#M8870</link>
    <description>Hi jjzhou,
&lt;BR /&gt;with your suggest now it works!
&lt;BR /&gt;Thanks.</description>
    <pubDate>Fri, 24 Jan 2014 10:17:33 GMT</pubDate>
    <dc:creator>gorotman</dc:creator>
    <dc:date>2014-01-24T10:17:33Z</dc:date>
    <item>
      <title>[resolved] tLdapInput : decoding the objectSID Attribute</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210443#M8864</link>
      <description>Hello, 
&lt;BR /&gt;I am using a tLdapInput to read Active Directory attributes. It gets perfectly String attributes such as cn, distinguishedName, ... 
&lt;BR /&gt;However, I cannot handle Microsoft Active Directory objectSid which is a binary type. 
&lt;BR /&gt; 
&lt;BR /&gt;When guessing metadata schema, Talend Open Studio detects a "String" type. I have forced the metadata to be byte[] but I have errors "cannot convert byte[] to string". 
&lt;BR /&gt;Following the article 
&lt;A href="http://www.jroller.com/eyallupu/entry/java_jndi_how_to_convert" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.jroller.com/eyallupu/entry/java_jndi_how_to_convert&lt;/A&gt; I have developped two routines to handle the String and convert objectSid to S-1-IdentifierAuthority-SubAuthority1-SubAuthority2-...-SubAuthorityn 
&lt;BR /&gt; 
&lt;BR /&gt;public static byte[] convertStringToByteArray(String objectSidAsString) { 
&lt;BR /&gt; byte[] theByteArray = objectSidAsString.getBytes(); 
&lt;BR /&gt; return theByteArray; 
&lt;BR /&gt;} 
&lt;BR /&gt;but it looks like when I used this method getSIDAsString from 
&lt;A href="http://www.jroller.com/eyallupu/entry/java_jndi_how_to_convert" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.jroller.com/eyallupu/entry/java_jndi_how_to_convert&lt;/A&gt; I have an error. 
&lt;BR /&gt;Are there any tricks to implement such as base64 encoding ? If so how ? 
&lt;BR /&gt;Should I use an Object java type for objectSid and use some ByteArrayOutputStream to deal with the object ? I have tried the following routine, but the method getSIDAsString in the article 
&lt;A href="http://www.jroller.com/eyallupu/entry/java_jndi_how_to_convert" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.jroller.com/eyallupu/entry/java_jndi_how_to_convert&lt;/A&gt; does not work either. 
&lt;BR /&gt;public static byte[] getBytes(Object obj) throws java.io.IOException{ 
&lt;BR /&gt; ByteArrayOutputStream bos = new ByteArrayOutputStream(); 
&lt;BR /&gt; ObjectOutputStream oos = new ObjectOutputStream(bos); 
&lt;BR /&gt; 
&lt;BR /&gt; oos.writeObject(obj); 
&lt;BR /&gt; oos.flush(); 
&lt;BR /&gt; oos.close(); 
&lt;BR /&gt; bos.close(); 
&lt;BR /&gt; 
&lt;BR /&gt; byte [] data = bos.toByteArray(); 
&lt;BR /&gt; return data; 
&lt;BR /&gt;} 
&lt;BR /&gt;I bet it is an encoding issue but I do not understand what I should do. 
&lt;BR /&gt;Any idea ? Should I have to develop a tLdapInput component handling this case ? 
&lt;BR /&gt;Thanks. Olivier</description>
      <pubDate>Sat, 16 Nov 2024 13:19:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210443#M8864</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tLdapInput : decoding the objectSID Attribute</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210444#M8865</link>
      <description>After investigation a bit, I have written the following class: 
&lt;BR /&gt; 
&lt;BR /&gt;public class objectSIDConv { 
&lt;BR /&gt;public static String getSIDAsString(String objectSid) { 
&lt;BR /&gt; // Add the 'S' prefix 
&lt;BR /&gt; String strSID = ""; 
&lt;BR /&gt; int version; 
&lt;BR /&gt; long authority; 
&lt;BR /&gt; int count; 
&lt;BR /&gt; String rid = ""; 
&lt;BR /&gt; strSID = "S"; 
&lt;BR /&gt; byte[] SID = new byte;; 
&lt;BR /&gt; byte[] defaultBytes; 
&lt;BR /&gt; String roundTrip =""; 
&lt;BR /&gt; 
&lt;BR /&gt; SID = objectSid.getBytes(); 
&lt;BR /&gt; // get version 
&lt;BR /&gt; 
&lt;BR /&gt; version = SID; 
&lt;BR /&gt; strSID = strSID + "-" + Integer.toString(version); 
&lt;BR /&gt; for (int i=2; i&amp;lt;=7; i++) { 
&lt;BR /&gt; rid += byte2hex(SID 
&lt;I&gt;);&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; // get authority&lt;BR /&gt; authority = Long.parseLong(rid);&lt;BR /&gt; strSID = strSID + "-" + Long.toString(authority);&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; //next byte is the count of sub-authorities&lt;BR /&gt; count = SID&amp;amp;0xFF;&lt;BR /&gt; System.out.println("version + Authority + Sub-auth-nb = " +rid + strSID + count);&lt;BR /&gt; &lt;BR /&gt; //iterate all the sub-auths&lt;BR /&gt; for (int i=0;i&amp;lt;count;i++) {&lt;BR /&gt; rid = "";&lt;BR /&gt; for (int j=11; j&amp;gt;7; j--) {&lt;BR /&gt; rid += byte2hex(SID);&lt;BR /&gt; &lt;BR /&gt; System.out.println("sub-auth = " + rid);&lt;BR /&gt; }&lt;BR /&gt; strSID = strSID + "-" + Long.parseLong(rid,16);&lt;BR /&gt; }&lt;BR /&gt; System.out.println("Final = " + strSID);&lt;BR /&gt; &lt;BR /&gt; // That's it - we have the SID&lt;BR /&gt; return strSID; &lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;BUT I still have errors: &lt;BR /&gt;Exception in component tMap_1&lt;BR /&gt;java.lang.ArrayIndexOutOfBoundsException: 27&lt;BR /&gt; at routines.objectSIDConv.getSIDAsString(objectSIDConv.java:283)&lt;BR /&gt; at certfi.test_ad_pmad_0_1.test_AD_PMAD.tLDAPInput_1Process(test_AD_PMAD.java:1314)&lt;BR /&gt; at certfi.test_ad_pmad_0_1.test_AD_PMAD.runJobInTOS(test_AD_PMAD.java:1869)&lt;BR /&gt; at certfi.test_ad_pmad_0_1.test_AD_PMAD.main(test_AD_PMAD.java:1743)&lt;BR /&gt;It looks like that SID = objectSid.getBytes() returns corrupt chain byte[] type. Is there any encoding required such as base64 ???&lt;BR /&gt;Many thanks. Olivier&lt;/I&gt;</description>
      <pubDate>Fri, 06 Aug 2010 19:49:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210444#M8865</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-06T19:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tLdapInput : decoding the objectSID Attribute</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210445#M8866</link>
      <description>Actually I confirm even when the method getSIDAsString ends up without any errors, I have buggy results, objectSID computed with the method are incorrect (different from objectSid that I browse with other tool such as apache directory studio) .&lt;BR /&gt;There is an encoding issue ... &lt;BR /&gt;Please help !</description>
      <pubDate>Fri, 06 Aug 2010 21:16:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210445#M8866</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-06T21:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tLdapInput : decoding the objectSID Attribute</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210446#M8867</link>
      <description>Okay, finally I have fixed the problem. 
&lt;BR /&gt; objectSid is a byte[] asn.1 encoded. It is not possible to "get" it directly from LDAP in string and then use method such as public static String getSIDAsString(String objectSid). It cannot work. 
&lt;BR /&gt;You must use env.put("java.naming.ldap.attributes.binary","objectSid"); 
&lt;BR /&gt;Next problem is : if you open an ldap request per objectSid you will quickly open too much connections. Ldap pool (establishing one session, and sharing this session to perform your ldap requests) is highly recommended. 
&lt;BR /&gt; 
&lt;BR /&gt;In order to do so, I have designed one routine and also the following design : 
&lt;BR /&gt;tLDAPInput ----&amp;gt; tJavaRow ---&amp;gt; tLogrow --&amp;gt; tFileOutpuExcel 
&lt;BR /&gt;tJavaRow's code is the following: 
&lt;BR /&gt; output_row.cn = input_row.cn; 
&lt;BR /&gt; output_row.SID = routines.UsePool.LdapPoolSid(input_row.cn); 
&lt;BR /&gt;Add int the output schema an "SID" row with String type. 
&lt;BR /&gt; 
&lt;BR /&gt;Here is the code of the routine UsePool (quick &amp;amp; dirty): 
&lt;BR /&gt; 
&lt;BR /&gt;import javax.naming.*; 
&lt;BR /&gt;import javax.naming.directory.*; 
&lt;BR /&gt;import java.util.Hashtable; 
&lt;BR /&gt;public class UsePool { 
&lt;BR /&gt;// @SuppressWarnings("unchecked") 
&lt;BR /&gt; public static String LdapPoolSid(String objectName) { 
&lt;BR /&gt; // Set up environment for creating initial context 
&lt;BR /&gt; Hashtable env = new Hashtable(11); 
&lt;BR /&gt; env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory"); 
&lt;BR /&gt; 
&lt;BR /&gt; String dirRoot = "/ou= People,DC=mycompany,DC=com"; 
&lt;BR /&gt; String adminName = "cn=myadmin, ou=srvaccount, ou=it, DC=mycompany,DC=com"; 
&lt;BR /&gt; String adminPassword ="itisasecret"; 
&lt;BR /&gt; String ldapURL ="ldap://myserver:389"; 
&lt;BR /&gt; //set security credentials, note using simple cleartext authentication 
&lt;BR /&gt; env.put(Context.SECURITY_AUTHENTICATION,"simple"); 
&lt;BR /&gt; env.put(Context.SECURITY_PRINCIPAL,adminName); 
&lt;BR /&gt; env.put(Context.SECURITY_CREDENTIALS,adminPassword); 
&lt;BR /&gt; 
&lt;BR /&gt; //connect to my domain controller 
&lt;BR /&gt; //env.put(Context.PROVIDER_URL, ldapURL); 
&lt;BR /&gt; 
&lt;BR /&gt; // Enable connection pooling 
&lt;BR /&gt; env.put("com.sun.jndi.ldap.connect.pool", "true"); 
&lt;BR /&gt; //specify attributes to be returned in binary format 
&lt;BR /&gt; env.put("java.naming.ldap.attributes.binary","objectSID"); 
&lt;BR /&gt; 
&lt;BR /&gt; try { 
&lt;BR /&gt; //connect to my domain controller 
&lt;BR /&gt; env.put(Context.PROVIDER_URL, ldapURL); 
&lt;BR /&gt; 
&lt;BR /&gt; env.put("com.sun.jndi.ldap.netscape.schemaBugs", "true"); 
&lt;BR /&gt; // debug only 
&lt;BR /&gt; //env.put("com.sun.jndi.ldap.trace.ber", System.out); 
&lt;BR /&gt; 
&lt;BR /&gt; // Create one initial context (Get connection from pool) 
&lt;BR /&gt; DirContext ctx = new InitialDirContext(env); 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; //Setup the search object. With this, we will pass in a base DN, and search all the child nodes 
&lt;BR /&gt; //In the ldap 
&lt;BR /&gt; SearchControls searchControls = new SearchControls(); 
&lt;BR /&gt; searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE); 
&lt;BR /&gt; 
&lt;BR /&gt; //specify the LDAP search filter 
&lt;BR /&gt; String searchFilter = "(&amp;amp;(objectClass=user)(cn=" + objectName +"))"; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; //Specify the Base for the search 
&lt;BR /&gt; String searchBase ="DC=fr,DC=ema,DC=ad,DC=pwcinternal,DC=com"; 
&lt;BR /&gt; //initialize counter to total the group members for debug ... not useful here 
&lt;BR /&gt; int totalResults = 0; 
&lt;BR /&gt; 
&lt;BR /&gt; //Specify the attributes to return 
&lt;BR /&gt; String returnedAtts[]={"cn","distinguishedName","objectSID"}; 
&lt;BR /&gt; searchControls.setReturningAttributes(returnedAtts); 
&lt;BR /&gt; //Search for objects using the filter 
&lt;BR /&gt; NamingEnumeration answer = ctx.search(searchBase, searchFilter, searchControls); 
&lt;BR /&gt; //Loop through the search results 
&lt;BR /&gt; while (answer.hasMoreElements()) { 
&lt;BR /&gt; SearchResult sr = (SearchResult)answer.next(); 
&lt;BR /&gt; Attributes attrs = sr.getAttributes(); 
&lt;BR /&gt; if (attrs != null) { 
&lt;BR /&gt; try { 
&lt;BR /&gt; for (NamingEnumeration ae = attrs.getAll();ae.hasMore() 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; { 
&lt;BR /&gt; Attribute attr = (Attribute)ae.next(); 
&lt;BR /&gt; // System.out.println("Attribute: " + attr.getID()); 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; System.out.println("XXXXXXXXXXX " +attrs.get("cn").get()); 
&lt;BR /&gt; 
&lt;BR /&gt; byte[] SID = (byte[])attrs.get("objectSID").get(); 
&lt;BR /&gt; String strSID = getSIDasStringOfBytes(SID); 
&lt;BR /&gt; System.out.println("YYYYYYYYYYYYYY " + strSID ); 
&lt;BR /&gt; return strSID; 
&lt;BR /&gt; } 
&lt;BR /&gt; 
&lt;BR /&gt; } 
&lt;BR /&gt; catch (NamingException e) { 
&lt;BR /&gt; System.err.println("Problem listing membership: " + e); 
&lt;BR /&gt; return "objectSID_ERROR"; 
&lt;BR /&gt; } 
&lt;BR /&gt; ctx.close(); 
&lt;BR /&gt; } 
&lt;BR /&gt; } 
&lt;BR /&gt; 
&lt;BR /&gt; } catch (NamingException ne) { 
&lt;BR /&gt; ne.printStackTrace(); 
&lt;BR /&gt; System.out.println("Error: " + ne); 
&lt;BR /&gt; return "objectSID_ERROR"; 
&lt;BR /&gt; } 
&lt;BR /&gt; return "objectSID_ERROR"; 
&lt;BR /&gt; } 
&lt;BR /&gt; public static String getSIDasStringOfBytes(byte[] sid) { 
&lt;BR /&gt; String strSID = ""; 
&lt;BR /&gt; int version; 
&lt;BR /&gt; long authority; 
&lt;BR /&gt; int count; 
&lt;BR /&gt; String rid = ""; 
&lt;BR /&gt; strSID = "S"; 
&lt;BR /&gt; 
&lt;BR /&gt; // get version 
&lt;BR /&gt; version = sid; 
&lt;BR /&gt; strSID = strSID + "-" + Integer.toString(version); 
&lt;BR /&gt; for (int i=6; i&amp;gt;0; i--) { 
&lt;BR /&gt; rid += byte2hex(sid 
&lt;I&gt;);&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; // get authority&lt;BR /&gt; authority = Long.parseLong(rid);&lt;BR /&gt; strSID = strSID + "-" + Long.toString(authority);&lt;BR /&gt; &lt;BR /&gt; //next byte is the count of sub-authorities&lt;BR /&gt; count = sid&amp;amp;0xFF;&lt;BR /&gt; &lt;BR /&gt; //iterate all the sub-auths&lt;BR /&gt; for (int i=0;i&amp;lt;count;i++) {&lt;BR /&gt; rid = "";&lt;BR /&gt; for (int j=11; j&amp;gt;7; j--) {&lt;BR /&gt; rid += byte2hex(sid);&lt;BR /&gt; }&lt;BR /&gt; strSID = strSID + "-" + Long.parseLong(rid,16);&lt;BR /&gt; }&lt;BR /&gt; return strSID; &lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; public static String byte2hex(byte b) {&lt;BR /&gt; String ret = Integer.toHexString((int)b&amp;amp;0xFF);&lt;BR /&gt; if (ret.length()&amp;lt;2) ret = "0"+ret;&lt;BR /&gt; return ret;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;Bye, Olivier&lt;BR /&gt;PS: I bet there is some cleanup to do in the code, any feedback is welcome !&lt;/I&gt;</description>
      <pubDate>Mon, 09 Aug 2010 21:25:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210446#M8867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-09T21:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tLdapInput : decoding the objectSID Attribute</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210447#M8868</link>
      <description>It works...thanks you saved me...I should be mad investigating about this....</description>
      <pubDate>Wed, 22 Jan 2014 15:32:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210447#M8868</guid>
      <dc:creator>gorotman</dc:creator>
      <dc:date>2014-01-22T15:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tLdapInput : decoding the objectSID Attribute</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210448#M8869</link>
      <description>Hi gorotman, 
&lt;BR /&gt; Maybe you need to tick "Binay" which you want to get in tLDAPInput advancedSetting.
&lt;BR /&gt; jjzhou</description>
      <pubDate>Fri, 24 Jan 2014 09:52:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210448#M8869</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-24T09:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tLdapInput : decoding the objectSID Attribute</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210449#M8870</link>
      <description>Hi jjzhou,
&lt;BR /&gt;with your suggest now it works!
&lt;BR /&gt;Thanks.</description>
      <pubDate>Fri, 24 Jan 2014 10:17:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210449#M8870</guid>
      <dc:creator>gorotman</dc:creator>
      <dc:date>2014-01-24T10:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tLdapInput : decoding the objectSID Attribute</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210450#M8871</link>
      <description>KGfAUH  &amp;lt;a href=""&amp;gt;gerbjncaogxc&amp;lt;/a&amp;gt;, cssuledokkaj, cejypflwsbci,</description>
      <pubDate>Sun, 26 Oct 2014 14:06:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210450#M8871</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2014-10-26T14:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tLdapInput : decoding the objectSID Attribute</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210451#M8872</link>
      <description>If you are using tFileInputLDIF or tFileOutputLDIF, do the following if not done and check.&lt;BR /&gt;1. In Basic settings, for each of the attributes you require check the "Binary" and "Base64"&lt;BR /&gt;2. In Advanced Settings, make sure the Encoding format is "UTF-8"&lt;BR /&gt;?????. ??????? ??????? ???????? ???????.</description>
      <pubDate>Thu, 15 Sep 2016 21:46:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210451#M8872</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2016-09-15T21:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tLdapInput : decoding the objectSID Attribute</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210452#M8873</link>
      <description>&lt;P&gt;I tried many things:&lt;/P&gt; 
&lt;P&gt;1) tLdapInput objectSid as Object -&amp;gt; serialize as byte[] -&amp;gt; convert to string&lt;/P&gt; 
&lt;P&gt;2)&amp;nbsp;tLdapInput objectSid as byte[] -&amp;gt; convert to string&lt;/P&gt; 
&lt;P&gt;It did not work until i set the Advanced "binary" setting! Many thanks &lt;A href="https://community.qlik.com/s/profile/0053p000007LLlkAAG"&gt;@jjzhou&lt;/A&gt;!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I was then able to get&amp;nbsp;tLdapInput objectSid as byte[] and run routine method to&amp;nbsp;convert to SID string.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The method&amp;nbsp;convertSidToStringSid from&amp;nbsp;&lt;A href="https://miromannino.com/blog/convert-a-sid-to-string-with-java/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://miromannino.com/blog/convert-a-sid-to-string-with-java/&lt;/A&gt;&amp;nbsp;works. Similarly as do&lt;/P&gt; 
&lt;P&gt;LdapUtils method&amp;nbsp;&lt;SPAN class="memberNameLink"&gt;&lt;A href="https://docs.spring.io/spring-ldap/docs/current/apidocs/org/springframework/ldap/support/LdapUtils.html#convertBinarySidToString-byte:A-" target="_blank" rel="nofollow noopener noreferrer"&gt;convertBinarySidToString&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(byte[]&amp;nbsp;sid) (ref:&amp;nbsp;&lt;A href="https://docs.spring.io/spring-ldap/docs/current/apidocs/org/springframework/ldap/support/LdapUtils.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.spring.io/spring-ldap/docs/current/apidocs/org/springframework/ldap/support/LdapUtils.html&lt;/A&gt;)&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;These are the Routine Libraries i used, and some import statements.and routine method definition.&lt;/P&gt; 
&lt;P&gt;spring-ldap-core-2.3.2.RELEASE.jar&lt;BR /&gt;spring-core-4.3.10.RELEASE.jar&lt;BR /&gt;sl4j-log4j12-1.7.6.jar&lt;BR /&gt;sl4j-api-1.7.6.jar&lt;BR /&gt;sl4j-jdk14-1.6.1.jar&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;import org.springframework.ldap.support.LdapUtils;&lt;BR /&gt;import org.springframework.core.*;&lt;BR /&gt;import org.slf4j.*;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;public static String convertBinarySidToString(byte[] sid){&lt;BR /&gt;&amp;nbsp; String sidStr = LdapUtils.convertBinarySidToString(sid);&lt;BR /&gt;&amp;nbsp; return sidStr;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 16:49:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tLdapInput-decoding-the-objectSID-Attribute/m-p/2210452#M8873</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-13T16:49:33Z</dc:date>
    </item>
  </channel>
</rss>

