Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 13th, 2007, 07:15 AM
Registered User
 
Join Date: Nov 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Getting AD Object Advanced ACLs in VB.NET



Hello there,
I am trying to write a VB.NET code to get the advanced security settings for a given Active Directory object (more specifically user ).

I have managed to write the following code that will list the access rules associated with an object. However, the ActiveDirectoryRights property displays generic rights (such as ReadProperty, WriteProperty). It provides no detailed permissions. By detailed permissions I mean those get listed when you click the Security tab then >> Advanced then >> Edit.

How is it possible to write a code in .NET to read/update those detailed permissions?

Any help is greatly appreciated.


------------------------------------------------------------------------------
Dim col1 As System.Security.AccessControl.AuthorizationRuleCol lection

Dim rule1 As ActiveDirectoryAccessRule

Dim acl1 As New System.DirectoryServices.DirectoryEntry(LDAP://stc.corp/CN=TestUser,OU=Users,OU=MyOU,DC=MyDomain,DC=com )

col1 = acl1.ObjectSecurity.GetAccessRules(True, True, GetType(System.Security.Principal.NTAccount))

For Each rule1 In col1

' Code to read the following properties :

' rule1.IdentityReference.Value

' rule1.PropagationFlags

' rule1.ActiveDirectoryRights.ToString

' rule1.IsInherited

' rule1.InheritedObjectType.ToString

Next

------------------------------------------------------------------------------
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
converting .NET error object in VB error object webnet .NET Web Services 0 February 5th, 2007 06:02 AM
Advanced Help! Object Class Programming! I'm stuck gingerj Javascript How-To 0 September 4th, 2006 02:55 PM
Making a COM object in VB.NET Cohadar Pro VB.NET 2002/2003 0 March 30th, 2006 06:49 AM
Printer Object in VB.NET ashu_from_india General .NET 1 March 8th, 2006 07:16 PM



All times are GMT -4. The time now is 11:06 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.