473,505 Members | 16,800 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to filter Active Directory using objectGUID ?

Ryo
Hello !

I want to do something like this:
string strFilter = "SyntaxThatICantFound";
DirectoryEntry dreAD = new DirectoryEntry("LDAP://192.168.0.1", "Admin",
"Admin");
DirectorySearcher drsAD = new DirectorySearcher(dreAD);
drsAD.Filter = "objectGUID=" + strFilter;
drsAD.FindOne().GetDirectoryEntry();
But I can't found the syntax for the string strFilter, indeed in Active
Directory objectGUID is a Byte[] and the drsAD.Filter take a string.
I have try "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" and
"XX-XX-XX-XX-XX-XX-XX-XX-XX-XX-XX-XX-XX-XX-XX-XX" with no result.
Someone have a solution ?
Thanks in advance.
Nov 19 '05 #1
0 1422

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
10262
by: Sacs | last post by:
Hi all, this is _really_ bugging me, and the Google God has failed me: Doing an ldap_search of a Wink2k Active Directory trying to get the objectGUID. This is a unique id within AD and is meant...
3
7175
by: Dirk Hagemann | last post by:
Hi! I asked here a few weeks ago the same question but the answer of Tim Golden didn't really help yet. I'd like to know how to set up a query for all computer-accounts in a special part of...
0
1853
by: Ammar | last post by:
I don't want to extend the AD schema but need the hierarchical info on some groups (objectGuids that maintain the group). So I need to store the objectGuid of groups and accounts into the...
2
2133
by: Jay Chan | last post by:
We have just installed a SQL Server 2000 (SP 3A) onto a computer that has Windows-2003 Server on it. Now, we cannot get access to that database server from other computers. Seem like this may be an...
9
3692
by: Mario Rodriguez | last post by:
Hi people. I have a problem adding users to Win2003 active directory programatically. When I execute my app throws the following exception: .................The specified directory service...
0
1520
by: Ouaes Jamali | last post by:
Hi all, I am trying to set the "Filter" property of directory search object so that the search returns only users that are not disabled in Active Directory? Currently the way i do this to make a...
1
887
by: Jay | last post by:
I need to add a parameter to a directorysearcher.filter rather than using hard-coded text. I have the following code that finds all members of an AD group and then for each of those results tries...
1
5304
by: vhg119 | last post by:
Can someone please link me to some resource listing all the user attributes names? I'm writing some C# code using the System.DirectoryServices assembly. This particular function is suppose to...
2
5527
by: jo3c | last post by:
Hi.. Im trying to get some information out of a windows sever 2003 chinese active directory system so let's say encoding is probably big5 or utf-8 what im doing is simliar to ldapsearch in...
0
7103
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7021
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7478
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5035
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4701
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1532
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
409
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.