On Fri, 17 Sep 2004 13:44:43 -0500, "Derek Martin" <dm*****@DONTSPAMMEokstateDOT.edu> wrote:
¤ Wonderful! Thank you Paul, is there a way to use what you just gave me to
¤ retrieve the user's group membership?
¤
¤ For instance, something like:
¤ dim mygroups as something = adentry.properties("memberOf").something
You can grab the list of groups in which the user is a member using the WinNT provider:
Dim ADGroups As Object
Dim ADGroup As Object
Dim DomainUser As String =
System.Security.Principal.WindowsIdentity.GetCurre nt.Name.Replace("\", "/")
Dim ADEntry As New System.DirectoryServices.DirectoryEntry("WinNT://" & DomainUser)
ADGroups = ADEntry.Invoke("Groups")
For Each ADGroup In ADGroups
Console.WriteLine(ADGroup.Name)
Next
Paul ~~~
pc******@ameritech.net
Microsoft MVP (Visual Basic)