How can I get the mailbox email details from Exchange Server for a user which don't have default mailbox (I have no default mailbox)?
Asked Answered
L

1

7

Hi I want to access the email of mailbox which is assign to me but it is not my primary mailbox in my Exchange Server.

I was able to get details of the mailbox server which is assigned to me, but I have a user which doesn't have a mailbox.

I want to know how to access that.

I read something related to Impersonation or delegation.

This is not working as the new user doesn't have primary mail.

  • How can I get how many mailbox assign to the user?
  • How can I get particular mailbox email for a user?

I was able to access my mailbox, but when I am trying to access the mailbox for user which doesn't have primary mailbox to it, I am not able to get.

 ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);
        service.Credentials = new WebCredentials("user-name", "password", "domain");
        //Autodiscover end point
        service.Url = new System.Uri("https://exchange-url/EWS/Exchange.asmx");
        FolderId SharedMailbox = new FolderId(WellKnownFolderName.Inbox, "maibox-name");
        ItemView itemView = new ItemView(1000);
        service.FindItems(SharedMailbox, itemView);

What can i do?

Leaving answered 1/6, 2018 at 10:57 Comment(2)
Exchange Administrator should delegate an access to you.Oran
Whats the error? Your code is exactly how it should be, so programmatically we cant help you. Can you verify @SergeyVaulin comment - you do have permission?Shenyang
I
0

Well, I found an interesting solution to this issue using Independentsoft.Exchange. Link here. and below is the code

 NetworkCredential credential = new NetworkCredential("username", "password");
 Service service = new Service("https://exchange-url/EWS/Exchange.asmx", credential);
 Independentsoft.Exchange.Mailbox mailbox = new Independentsoft.Exchange.Mailbox("[email protected]");
 StandardFolderId InboxFolder = new StandardFolderId(StandardFolder.Inbox, mailbox);

Hope this helps

Ixtle answered 12/6, 2018 at 6:16 Comment(1)
will check this .Leaving

© 2022 - 2024 — McMap. All rights reserved.