Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Tue, 16 May 2006 16:32:51 +0200,    group: microsoft.public.platformsdk.active.directory        back       


Get User or Group by objectSID Filter   
Hi,

I would like in c# get a user or a group using objectSID ref.

sample:
******
DirectoryEntry de = Utility.GetDirectoryObject();

DirectorySearcher deSearch = new DirectorySearcher();

deSearch.SearchRoot = de;

deSearch.Filter = "(&(objectClass=group)(objectSid=" + SID + "))";

SearchResult result = deSearch.FindOne();

My problem :
**********
I have a SID value in byte[] type. What sort of string value I have to put
in my filter and how to obtain it?

Thanks a lot

SD
date: Tue, 16 May 2006 16:32:51 +0200   author:   SD

Re: Get User or Group by objectSID Filter   
You multiposted.  Answered in the active.directory.interfaces group.

Joe K.

"SD"  wrote in message 
news:OksLyVPeGHA.3632@TK2MSFTNGP02.phx.gbl...
> Hi,
>
> I would like in c# get a user or a group using objectSID ref.
>
> sample:
> ******
> DirectoryEntry de = Utility.GetDirectoryObject();
>
> DirectorySearcher deSearch = new DirectorySearcher();
>
> deSearch.SearchRoot = de;
>
> deSearch.Filter = "(&(objectClass=group)(objectSid=" + SID + "))";
>
> SearchResult result = deSearch.FindOne();
>
> My problem :
> **********
> I have a SID value in byte[] type. What sort of string value I have to put
> in my filter and how to obtain it?
>
> Thanks a lot
>
> SD
>
>
>
>
>
>
date: Tue, 16 May 2006 10:49:48 -0500   author:   Joe Kaplan \(MVP - ADSI\)

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us