Getting Mailbox Rights in C# .NET

  • Thread starter Thread starter TM
  • Start date Start date
T

TM

Hello all - I'm hoping you will be able to shed some light on this
little dilemma ;)

I would like to know how to retrieve Mailbox Rights information from
DirectoryServices (or if this isn't the way to do, how do you?).
Mailbox Rights are setup via Active Directory: User properties >
Exchange Advanced > Mailbox Rights. This information does not seem to
come back when I query properties using DirectoryServices. I am able
to get delegate information (Exchange General > Delivery Options > Send
on Behalf) with the properties.

Your help is much appreciated!
Blessings,
TM

Code... I set the user information for the query, and then run this:

foreach(SearchResult srm in ds.FindAll())
{
Response.Write(":" + srm.ToString() + "<br>");
foreach(string propName in srm.Properties.PropertyNames)
{
Response.Write("<br><br><b>::" + propName + "</b><br>");
foreach(object val in srm.Properties[propName])
{
Response.Write(":::" + val.ToString() + "<br>");
if ( propName.ToString() == "memberof")
{
isGeneral = false;

if ( val.ToString() ==
"CN=dsAdministrator,CN=Users,DC=dev3,DC=aci,DC=com" )
isAdminUser = true;
else if ( val.ToString() ==
"CN=dsSubAdministrator,CN=Users,DC=dev3,DC=aci,DC=com" )
isSubAdminUser = true;
else if ( val.ToString() ==
"CN=dsCPC,CN=Users,DC=dev3,DC=aci,DC=com" )
isCpcupUser = true;
else if ( val.ToString() ==
"CN=dsEmployeePhotoAlbum,CN=Users,DC=dev3,DC=aci,DC=com" )
isEmployeePhotoAlbumUser = true;
else if ( val.ToString() ==
"CN=dsPowerUser,CN=Users,DC=dev3,DC=aci,DC=com" )
isPowerUser = true;
}


}
}
}
 
Back
Top