We help IT Professionals succeed at work.
Get Started

Accessing user created Exchange 2011 calendars through Exchange Web Services (SOAP)

Last Modified: 2012-05-11

I am trying to access a calendar hosted by Microsoft Exchange 2007 through Exchange Web Services.  To build up the SOAP request, I am using a class based on the work done here:


The PHP is all functioning exactly as expected, so this is not a PHP question.  Indeed, I am able to access the default user calender perfectly, by using the following construction:

$FindItem->Traversal = "Shallow";
$FindItem->ItemShape->BaseShape = "AllProperties";
$FindItem->ParentFolderIds->DistinguishedFolderId->Mailbox->EmailAddress = "user@domain.com";
$FindItem->ParentFolderIds->DistinguishedFolderId->Id = "calendar";
$result = $client->FindItem($FindItem);

However, the target I really want to access is not the default user calendar (using the special 'calendar' identifier), but an additional user created calendar (several, in fact).  This is the sort you can make in Outlook when you create a new folder of type calendar.

Doing this for user created mail folders is straight forward, as one can obtain an Id and ChangeKey from a FindFolder operation and plug it into the FindItem call, as below.

$FindItem->ParentFolderIds->FolderId->Id = "id_from_FindFolder_result"
$FindItem->ParentFolderIds->FolderId->ChangeKey = "ChangeKey_from_FindFolder_result"

If you run the FindFolder operation at root level (Top of Information Store), using Traversal = 'Deep', an exhaustive list of all mail folders will appear (and Notes too), but no calendar folders.

My question is...  How do I construct a FindFolder operation to include calendar folders?  As mentioned earlier, addressing the default user calendar is easy, what with the reserved Ids available, laid out by Microsoft at the links below.  I dare say I could address these calendars with FindItem, but need FindFolder to obtain the Id and ChangeKey to plug into it.



Any help would be most appreciated.  Do ask questions if I've not been clear enough.

Best wishes,

Watch Question
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE