Re: C# - need to query based on objectGUID ?
- From: "bitshift" <jobob@xxxxxxx>
- Date: Tue, 26 Jun 2007 16:22:03 -0500
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 ?
.
- Follow-Ups:
- Re: C# - need to query based on objectGUID ?
- From: Joe Kaplan
- Re: C# - need to query based on objectGUID ?
- From: Dean Wells \(MVP\)
- Re: C# - need to query based on objectGUID ?
- References:
- C# - need to query based on objectGUID ?
- From: bitshift
- Re: C# - need to query based on objectGUID ?
- From: Dean Wells \(MVP\)
- C# - need to query based on objectGUID ?
- Prev by Date: Re: C# - need to query based on objectGUID ?
- Next by Date: Re: Flattening a Forrest
- Previous by thread: Re: C# - need to query based on objectGUID ?
- Next by thread: Re: C# - need to query based on objectGUID ?
- Index(es):
Relevant Pages
|
Loading