Good job, Brian! This is excellent. One thing I noticed is that I can't return more than one binary column in a single CFLDAP call. When I specify "objectGUID,objectSID" for ATTRIBUTES and RETURNASBINARY, neither is returned as binary.
You are correct about the first eight bytes being switched around. I found an article on MS's KB regarding this. You might check CFLIB.org to see if anyone has already created a UDF that re-arranges the bytes as needed. Also, I was able to query AD using the objectGUID, but you have to do some work with the HEX data. It has to look something like: \b4\b3\b2\b1\b6\b5\b8\b7\b9\b0\ba\bb\bc\bd\be\bf Thanks for sharing this solution. M!ke -----Original Message----- From: Brian Dumbledore [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 10:55 AM To: CF-Talk Subject: Re: how to retrieve objectguid (LDAP) in a legible format Ok.. Here is what I found... There IS a way to retrieve objectguid in a legible format. I am using cf 7 first thing you NEED to do is in the attributes list you give the objectguid. Then use RETURNASBINARY option for the tag and AGAIN give objectguid there. Doing so, you are basically telling what attributes in the attributes list you mentioned need to be returned as binary. Do this and the objectguid returned satisfies the isBinary()check. So you now have a binary object that coldfusion understands. Now, I did a binaryencode(objectguid,"HEX") and finally go the object in its legible glory. HOWEVER, here is what I noticed. For those using Softterra's ldap administrator (that's what I am using), what you see in the admin and what you get as hex after binaryencode()ing is different (sort of). The last 64 bits are intact, in the first 64 however, there seems to be a bit of shuffling (don't know which side does this, the ldapadmin or CF). Here is what happens in the first 8 bytes. B1 B2 B3 B4 B5 B6 B7 B8 (ldapadmin) is seen as B4 B3 B2 B1 B6 B5 B8 B7 (binaryencode()) Can anyone please confirm this? Anyway since this is just bit shuffling, we do have a unique id which is always guaranteed to be unique. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:245009 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

