Wroking with Active directory

N

nicknack

Hello,
I'm working with active directory and I've used:
directorysearcher search =new...;
search.propertiesToLoad.Add("cn");

That give me the user name. now if I'm also getting the "memberof"
property I'm getting alot of groups for the user.

Is there a built in function that tell me if the user is in a specific
group instead of writing my own function that will run on all the
groups that the user is a member of them and compere?

some thing like:
bool x=isCurrentUserMemberof("myGroupName");

Hope i was clear enough.
Thanks.
 
M

Marc Scheuner

That give me the user name. now if I'm also getting the "memberof"
property I'm getting alot of groups for the user.

Is there a built in function that tell me if the user is in a specific
group instead of writing my own function that will run on all the
groups that the user is a member of them and compere?

No there's no such function - you will have to grab the list of groups
a user is member of, and do the comparison yourself.

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top