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



This JoeK's area of expertise, I'll defer to him on how best to proceed.

G'luck!

--
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:O00KkhDuHHA.1212@xxxxxxxxxxxxxxxxxxxxxxx
Ok, thanks. So how do I use this format when using the .Net framework
classes such as DirectoryEntry and/or DirectorySearcher, as mentioned
in this example article
http://www.willasrari.com/blog/query-active-directory-users-using-c/000133.aspx

Also, for example, could I use the static metod
DirectoryEntry.Exists( ) ?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sds/sds/directoryservices_directoryentry_exists_string.asp




"Dean Wells (MVP)" <dwells@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:Oq%23vtZDuHHA.3688@xxxxxxxxxxxxxxxxxxxxxxx
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: Universal Group Membership Caching
    ... Dean Wells [MVP / Directory Services] ... since all KDC are DCs and all DCs maintain a config. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Universal Group Membership Caching
    ... Dean Wells [MVP / Directory Services] ... since all KDC are DCs and all DCs maintain a config. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Local SID v. Domain SID.
    ... This is not true for the relationship between any 2 workstations regardless of whether they have the same SID, are members of the same domain, trusted domains or if they exist in the same or even different workgroups. ... Dean Wells [MVP / Directory Services] ...
    (microsoft.public.windows.server.active_directory)
  • Re: AD Site Consolidation
    ... Dean Wells [MVP / Directory Services] ... SiteA and SiteB are connected by a high speed WAN link. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Redirecting the users and computers containers in Windows Serv
    ... they will be created in whatever OU or container you ... Dean Wells [MVP / Directory Services] ...
    (microsoft.public.windows.server.active_directory)