ews-java-api icon indicating copy to clipboard operation
ews-java-api copied to clipboard

How to get a list of shared mailboxes for a user?

Open Nishikant1103 opened this issue 4 years ago • 1 comments

    ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
    ExchangeCredentials credentials = new WebCredentials("username", "pwd");
    service.setCredentials(credentials);
    service.setUrl(new URI("https://xyz/EWS/Exchange.asmx"));

    Mailbox mailbox = new Mailbox("sharedMailboxAddress");
    FolderId folderId = new FolderId(WellKnownFolderName.MsgFolderRoot, mailbox);

    FolderView folderView = new FolderView(20);
    FindFoldersResults results = service.findFolders(folderId, folderView);

Currently, I am able to access the shared mailbox of a user account if I already know the address of the shared mailbox. However, if I know just the user account details (but not the shared mailboxes it has access to), how can I retrieve the list of shared mailboxes linked to this user account?

Nishikant1103 avatar Dec 09 '21 13:12 Nishikant1103

same question, do you find the answer? or any other solution

cywan1998 avatar Mar 12 '24 09:03 cywan1998