Re: C# - need to query based on objectGUID ?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Use the GUID as the base of the query like this (also note that the
example line below describing the 'base' of the query uses angled
brackets but is not intended to signify something you should replace; it
is entirely literal with the obvious exception of the value for the GUID
itself) -

base: <GUID=EC6EEA8C-6011-43C5-9FF7-FF3D3A0A21C9>
filter: something suitable that won't exclude the desired result set -
your choice
scope: same rational as a regular query - your choice

Hope that makes sense.

--
Dean Wells [MVP / Directory Services]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l


"bitshift" <jobob@xxxxxxx> wrote in message
news:%238Y%23zIDuHHA.3368@xxxxxxxxxxxxxxxxxxxxxxx
How can I search AD if im given a objectGUID string ? Im first doing
a search using DirectorySearcher with a "SAMAccountname=" value, which
returns correctly. Then I get the directory entry and the objectguid.
I need to pass this value to another part of my application, and then
verify its existence in AD by querying the directory with it as a
search filter. What is the filter I use to do this with ?



.



Relevant Pages

  • Re: ldap query with guid
    ... See if this filter works for that GUID: ... then it is just a case of needing to convert the COM style string format GUID to binary format and then prefixing each byte with a \. ... I want to query for the property "msexchmailboxguid", I think this value might be of type "16 bytes array", not "guid", which might make it hard to specify in a query tool. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Oracle Spatial SDO Aggregate Union fails with ORA-29913 ODCIAGGREGATEMERGE
    ... GEOMETRIE FROM DGDTW_TOPOGRAFIE; ... there is a administrative coupling on a guid. ... doesnt seem to make any difference(see query 3). ... 14 INNER JOIN DGDTW_OBJECTGUIDS GUIDS ...
    (comp.databases.oracle.misc)
  • Re: SQL Against MS Access
    ... >the specifying the Guid value, I get back 3 rows, all of them with the ... >from the query mentioned above), ... >FROM SkatingClubs sc, Skater s, SkatingLevels sl, Bracket b, Events e, ... > CompetativeEvents ce, CompetitionDescription cd, EventFinals ef ...
    (microsoft.public.dotnet.framework.adonet)
  • SQL Against MS Access
    ... supply a "Guid" value in the where clause. ... So now if I now change the query to specify that Guid number (returned ... FROM SkatingClubs sc, Skater s, SkatingLevels sl, Bracket b, Events e, ... CompetativeEvents ce, CompetitionDescription cd, EventFinals ef ...
    (microsoft.public.dotnet.framework.adonet)
  • ldap query with guid
    ... How do I specify a ldap query with a filter for a guid? ... I want to query for the property "msexchmailboxguid", I think this value might be of type "16 bytes array", not "guid", which might make it hard to specify in a query tool. ...
    (microsoft.public.windows.server.active_directory)