Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

LDAP GUID - Data Conversion

Guest
Mar 15, 2011 Mar 15, 2011

Hello,

Im trying to convert the following value into its 'actual' value:

guid.png

The value is generated from a guid attribute coming straight from LDAP. What is the best way to convert this value into its actual guid value?

Any and all assistance is appreciated.

1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 15, 2011 Mar 15, 2011

I'm guessing the value is not being returned as a string.  Which, if any, of the conversion functions in CF have you tried to use?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 15, 2011 Mar 15, 2011

Thanks for the reply. Ive moved forward a bit now and am returning the value in binary format from my CFLDAP query using the returnasbinary="objectguid".And then using BinaryEncode(value,"Hex") to convert it to a string. I don't believe this is the correct format though, there are no dashes in it as a 'normal' GUID typically looks like. Is there a better way?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 15, 2011 Mar 15, 2011

I haven't tried for a number of years - so this could go back a number of CF versions, and this might be out-of-date info - but the last time I tried it was not possible to fetch binary data from Active Directory using CFLDAP.  CFLDAP munged the value (the binary data could be fetched fine using other LDAP clients, so it was CFLDAP getting it wrong)

You might want to have a google around the plkace to see if there's any archived discussion on this (I'm sure I would have brought it up in the old forums...?)

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 15, 2011 Mar 15, 2011

Thanks for the replies. @Adam - I think the returnbinary attribute is new as of 7 or 8.

In my searching I have stumbled onto this houseoffusion thread:

http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:46529

Within the thread above I found a link to this CFC. Im going to give it a whirl and see how it goes.

http://www.cflib.org/index.cfm?event=page.udfbyid&udfid=705

Another alternative is JLDAP, which requires an executable to be placed in the lib (which Im not allowed)

http://www.numtopia.com/terry/programming/code_java_ldap.cfm

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 24, 2011 Mar 24, 2011
LATEST

The solution above has fullfilled my needs. Thanks all.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources