Link to home
Start Free TrialLog in
Avatar of MaxStephen
MaxStephen

asked on

Get the mail distribution list owner from Active Directory

Hi,

How can I get the owner of the Outlook  distribution list? I'm using the Directory Services namespace .  I've already get all the members of the a given mail group thru DirectorySearcher but there is no owner property available in DirectoryEntry Class. Can I use the Microsoft.Office.Interop.Outlook COM object to get the owner of the group (group name that I retrieve from DirectorySearcher)?  

Please advise.
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

The owner is held in the managedBy attribute (property).

Chris
Avatar of Shweta Goel
Shweta Goel

Go to Settings > Options > Other > Go to the earlier version > Groups > Distribution group I own > Edit > Ownership from the left hand window plane.
It depends on how you labeled it. If you have labeled them properly either in description field or managed by you can query them via ps commands.
Avatar of MaxStephen

ASKER

Hi All,

Thanks for sharing. I would like to achieved this programmatically using C#. I've already tried to use the DirectoryEntry Class properties but the "managedBy" property is not available on the class.  

Can I get the owner info by filtering the directory using the DirectorySearcher?  

Thanks,
Max
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Chris.