Home : Accessing Other Users' Mailboxes
Q147062 - HOWTO: Accessing Other Users' Mailboxes

Accessing Other Users' Mailboxes

 

Most of the examples provided in our documentation show how to access folders, messages, appointments, etc. belonging to the Java-Exchange user. Remember that the Java-Exchange user is the user account you used to configure CDO. But what if you want to access the mailbox of users other than the Java-Exchange user?

The basic security policy when it comes to accessing mailboxes and folders in the Exchange Server is:

  1. Only user A can have access to mailbox A
  2. User B may be allowed access to mailbox A only if user A has explicitly given/delegated access to user B
  3. Public folders can be accessed by any user

Since CDO has been configured using the Java-Exchange user account, you therefore have to delegate the correct permission to the Java-Exchange user so it can access other user's mailboxes. Microsoft Exchange provides 2 ways to do access delegation:

  1. Individual Delegation
  2. The idea is to give the Java-Exchange user access to individual mailboxes. To do this, refer to this MSDN article.

  3. Make the Java-Exchange User a Service Account that will have access to ALL mailboxes
  4. If you need the Java-Exchange user to have access to ALL mailboxes, doing it through individual delegation would certainly be tedious. The easier way would be to make the Java-Exchange user a Service Account, as discussed in this MSDN article.

    There above artilce provides two methods to create a Service Account. We suggest you follow the second method as it is simpler. Just add the Java-Exchange user to the Exchange Domain Servers group using Active Directory. Make sure that Java-Exchange user belong ONLY to the Exchange Domain Servers group and not to any other admin group as this may cause a rights conflict. For instance, if the Java-Exchange user belongs to a group that has access to all mailboxes and to another group that has limited access, the more restrictive access prevails.

After you have given the Java-Exchange user the correct permission either through individual delegation or making it a Service Account, you can now use it to access other user's mailboxes. The only thing you need to change in your Java code is the mailbox parameter in the Session.logon() call. The mailbox name would now be the name of that other mailbox you wish to access. All the rest of the code remains the same. If you are using a Service Account as explained in option #2 above, make sure that you use the domain, username and password of this Service Account as parameters to the AuthInfo.setDefault() method call. Also, do not forget to re-configure CDO using this Service Account's identity. 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 6/23/2006.
Last Modified on 7/10/2006.
Last Modified by No Author Name Available!.
Article has been viewed 6079 times.
Rated 4 out of 10 based on 6 votes.
Print Article
Email Article