-
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.
-
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.
-
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)"
Page generated in 1,714,145,627.68561 seconds with 11 queries