Skip to main content
March 15, 2011
Question

LDAP GUID - Data Conversion

  • March 15, 2011
  • 1 reply
  • 1762 views

Hello,

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

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.

    This topic has been closed for replies.

    1 reply

    Inspiring
    March 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?

    March 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?

    Inspiring
    March 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