This content has been marked as final. Show 6 replies
First, you will need the "returnAsBinary" attribute of CFLDAP.
Then, read this:
And look at this:
Thanks for the information.
Unfortunately, though it gives me some avenues of investigation, this stuff is WAY beyond my pay grade , so please bear with me.
First, I have been retrieving ObjectSID as binary, so that is not an issue. The references indicate that I must manipulate that binary data somehow -- but it looks like the manipulation shown is unique to the format of GUID, not ObjectSID. Surely that changes the manipulation I'll be required to do?
Second (and related to the first): it appears that I have to process each array element into a corresponding set of decimal (not hex) digits (I THINK the substrings in ObjectSID are always decimal, except for the initial 'S'?). I don't understand the processing methodology in the example: why does the code consider only the rightmost 2 characters of each array element?
As you can see, I'm a total novice at working with binary data. Any additional info would be greatly appreciated.
The attached code is a working example of how I retrieve binary, and other, data from Active Directory. This code is for debugging or quick dumps of a person's account.
Make sure the change your server, domain, username and password values before running the code.
This works perfectly; thank you.....
Except for one thing: It returns
ObjectSID (Binary Value converted to Hex) 0105000000000005150000000703FBC41125E21C37690BF7F4010000
and I need to convert that to S-x-yyyyy-zzzz-......
This is what has been throwing me. Where do I go from here?
My guess is you need to substring that value and build it, manually.
Which I'm now in the process of doing. Thank you for all of your help.