473,796 Members | 2,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

List groups that a user belong using AD

How do i list the groups a user belong using AD?

thanks,
Gonçalo Boléo
Nov 16 '05 #1
3 2316
Hi Gonçalo!

Use the System.Director yServices namespace to access AD. Here is a code
example that shows how to use a Windows form to enumerate user memberships:

http://msdn.microsoft.com/library/de...emberships.asp

ok,
aq

"Gonçalo Boléo" <gb****@netcabo .pt> wrote in message
news:eT******** ******@TK2MSFTN GP09.phx.gbl...
How do i list the groups a user belong using AD?

thanks,
Gonçalo Boléo

Nov 16 '05 #2
Gonçalo,

If you are using AD you can use the System.Director yServices namspace to
find this information. It is comprised of two classes DirectoryEntry and
DirectorySearch er.
You should be able to instantiate a DirectorySearch er to query for your
information by passing it a DirectoryEntry object. You should be able to
find any information that you would like in AD using these objects.

Hope this helps.
Nov 16 '05 #3
JT
please refer to this article:
http://www.wwwcoder.com/main/parenti...8/default.aspx

this ensures that all groups which the user belongs to will be listed.

Gonçalo Boléo wrote:
How do i list the groups a user belong using AD?

thanks,
Gonçalo Boléo

Nov 16 '05 #4

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

Similar topics

2
1388
by: Bob C. | last post by:
I am converting a relatively large multi-user Access 97 database to SQL Server 2000. I use about a dozen groups to manage security, providing graduated levels of access to each group. I read that in SQL Server a user can belong to only two groups, "users" and one other. If this is true, can someone point me in the right direction as to how I could get around this limitaion? Thanks, Bob C.
0
928
by: Gonçalo Boléo | last post by:
How do i list the groups a user belong using AD? thanks, Gonçalo Boléo
0
1532
by: James | last post by:
Hello All, I am working in a Windows NT domain environment, working with C#. What I want to be able to do is view all the groups a user belongs to, and also be able to add the users to groups. I want to be able to enter a user name and then get it to diaplay all the groups this user belongs to. Are the groups a user belongs to stored as child entries under the user, or are users child entries under groups, or am I way off track.
3
2074
by: Amelyan | last post by:
When we want radio button to belong to a group name we say, radio1.GroupName="GroupA". In this case, radio1 will be unselected if another radio button is selected in "GroupA". Is there a way (trick, custom RadioButton, or javascript) to make radio button (radio1) belong to 2 independent radio button groups instead of one? This would be an equivalent of sayting something like radio1.GroupName1 = "GroupA"; radio1.GroupName2 = "GroupB";
2
2159
by: Jr. BTS dev! | last post by:
Hello all, In my web app I want to authenticate users using the Windows NT user Groups they blong to. The app will be used internally. Users will all belong to the same domain Users are separated by groups In more details I want to know if the user is administrator, users, customer service (a windows group i create) and so on. I tried using Request.LogonUserIdentity.Groups but did not result in what I want.
2
1911
by: gary.comstock | last post by:
We have setup 4 NT groups - Executive, Manager, Employee and Contractor. The premise is that an Executive has all of the privileges of Itself plus Manager plus Employee plus Contractor while an Employee only has itself and Contractor. We did this as a hierarchy where the higher (i.e. Executive) has a member of the one directly below (i.e. Manager): Executive has a member of Manager Manager has a member of Employee
10
26815
by: Jeff Williams | last post by:
How can I get a list of the Groups both Local and Domain groups a User belongs to.
2
6233
by: Lysander | last post by:
I have not seen this feature documented before, so I thought I would share it with you, as I will be using it in a later article. For a combo or list box, the source data is normally a Table/Query. Or it could be a value list, a static list of data. But what if your information is not held in a table, and it is not a static list. Examples I have used have been, “next 100 prime numbers after this one”, “Every third Friday from start of...
2
2763
by: rote | last post by:
My sceanrio is this on an asp.net 2.0 freamework. I want to use any of the data controls e.g Gridview,DetailView etc.. But i want some buttons e.g update,edit save etc to be enable or disabled based on if they belong to some security groups in active directory. I'm looking for the best options for this because i want to store those security groups somewhere and then check for the user against those security groups for their authorisation...
0
9679
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9527
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10453
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10172
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9050
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.