Results 1 to 3 of 3

Thread: ldap query with guid

  1. #1
    Join Date
    Jul 2006
    Posts
    442

    ldap query with guid

    Can anyone tell me how to specify a LDAP query with a filter for a guid? I need to query for the property "msexchmailboxguid", and I think this value could be of type "16 bytes array", not "guid", which could make it hard to specify in a query tool. The query with a filter is like:

    (displayname=XYZ)
    will work, but the filter:
    (msexchmailboxguid={12345678-1234-1234-1234-123412341234})
    will not return any AD object.

    Any help would be appreciated.

  2. #2
    Join Date
    Jun 2006
    Posts
    623

    Re: ldap query with guid

    Can you check if the below filter works for that GUID:

    msExchMailboxGUID=\78\56\34\12\34\12\34\12\12\34\12\34\12\34\12\34

    It it is working, then it is just a case of wanting to convert the COM style string format GUID t binary format and then prefixing each byte with a \. I have a tool on my site in the files called GUIDConverter that simplifies the conversion of GUIDs to formats that are useful in LDAP.

  3. #3
    Join Date
    Oct 2005
    Posts
    1,217

    Re: ldap query with guid

    I think that you should use the hex format for the guid and then escape the hex characters. For instance, if the objectGUID is "{B95F3990-B59A-4A1B-9E96-86C66CB18D99}", then the hex format is "90395FB99AB51B4A9E9686C66CB18D99", and you will use:

    "(objectGUID=\90\39\5F\B9\9A\B5\1B\4A\9E\96\86\C6\6C\B1\8D\99)"

Similar Threads

  1. LDAP query to speficied LDAP server on TCP port 389 failed
    By Shash in forum Windows Server Help
    Replies: 2
    Last Post: 02-05-2012, 05:01 PM
  2. LDAP query to two different domains
    By manjusha in forum Technology & Internet
    Replies: 1
    Last Post: 01-12-2010, 04:58 PM
  3. LDAP Query AD
    By shivinder in forum Active Directory
    Replies: 4
    Last Post: 03-06-2010, 11:23 AM
  4. LDAP query
    By Palaksi in forum Active Directory
    Replies: 3
    Last Post: 11-12-2008, 02:09 AM
  5. LDAP query can it be done ?
    By zscw1 in forum Active Directory
    Replies: 3
    Last Post: 13-11-2008, 10:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,556,302.64565 seconds with 18 queries