3

I am using a php-ews to access our EWS server. I found an example for creating a calendar event as follows:

$request = new EWSType_CreateItemType();
$request->SavedItemFolderId->DistinguishedFolderId->Id=EWSType_DistinguishedFolderIdNameType::CALENDAR;
$request->SavedItemFolderId->DistinguishedFolderId->Mailbox->EmailAddress = "dude@test.com";
...

My question: what is DistinguishedFolderId->Mailbox->EmailAddress and what does it do? I know this attribute is optional.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
AVK
  • 645
  • 9
  • 22

1 Answers1

3

The EmailAddress is optional if you want to access a Mailbox folder in another users mailbox eg if your using user1's credentials and you want to access user2's Inbox this is when you would use User2's email address in that attribute. If it is omitted then User1 Mailbox would be returned.

In EWS this is referred to as Delegate access there is a discussion between the difference between delegate and Impersonation on http://blogs.msdn.com/b/exchangedev/archive/2009/06/15/exchange-impersonation-vs-delegate-access.aspx

Cheers Glen

Glen Scales
  • 20,495
  • 1
  • 20
  • 23
  • Much obliged! Do you by any chance know if this is available on all EWS 2007 through present? – AVK May 29 '14 at 07:01
  • Yes this is the same on all versions of Exchange from 2007 to 2013 – Glen Scales May 30 '14 at 04:35
  • @GlenScales Does this only work between accounts? For example, can this somehow be used to access a shared calendar account created through Gecko? – Jonathan Coe Feb 26 '15 at 21:27
  • Yes as long as you have access to the Shared Calender you just use the PrimarySMTPAddress of that Mailbox and it should work okay – Glen Scales Feb 26 '15 at 23:01