none
[E2010][EWS] How to find out who booked a resource? RRS feed

  • Question

  • How to find out who booked a resource using EWS (SOAP)?

    This is what I tried:

    1. As 'user' I created meeting request with resource 'room' (using OWA).

    2. As 'user' I called GetUserAvailabilityRequest on resource 'room' (EWS), and got (shortened output):

                <CalendarEventArray xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
                  <CalendarEvent>
                    <StartTime>2012-02-23T23:00:00</StartTime>
                    <EndTime>2012-02-24T23:00:00</EndTime>
                    <BusyType>Tentative</BusyType>
                    <CalendarEventDetails>
                      <ID>0000000048A4A94B0FBA4B4493FCE92B3E2E08D30700B8765AC4D2AB9641B246D187D2FA3BB2000000DD67230000B8766AC4D2AB9641B246D187D2FA3BB2000000DD8E800000</ID>
                      <Subject>asdf</Subject>
                      <Location>room</Location>
                      <IsMeeting>true</IsMeeting>
                      <IsRecurring>false</IsRecurring>
                      <IsException>false</IsException>
                      <IsReminderSet>true</IsReminderSet>
                      <IsPrivate>false</IsPrivate>
                    </CalendarEventDetails>
                  </CalendarEvent>
                </CalendarEventArray>
       

    3. As 'user' I converted 'ID' to 'EwsLegacyId', and called GetItem but got response: "The specified object was not found in the store."

    Please help.



    • Edited by _Adam Friday, February 24, 2012 11:58 AM
    Friday, February 24, 2012 11:56 AM

All replies

  • The first thing would be to check if the user has permissions to the Meeting Rooms calendar your trying to access they will need to have at least Reviewer assigned. You can assign this to all user by modify the Default ACE eg

    Set-MailboxFolderPermission -Identity meetingroom@domainblah.com:\Calendar -User Default -AccessRights Reviewer
    With your convertID operation you should be convert from the HexEntryID to the EWSid (not the EWSLegacyId unless you using pre 2007 SP1 server)

    Cheers
    Glen
    Monday, February 27, 2012 1:34 AM
  • The first thing would be to check if the user has permissions to the Meeting Rooms calendar your trying to access they will need to have at least Reviewer assigned. You can assign this to all user by modify the Default ACE eg

    Set-MailboxFolderPermission -Identity meetingroom@domainblah.com:\Calendar -User Default -AccessRights Reviewer

     It didn't help still: 'The specified object was not found in the store.'

    With your convertID operation you should be convert from the HexEntryID to the EWSid (not the EWSLegacyId unless you using pre 2007 SP1 server)

    Cheers
    Glen

    Request (using EWSid):

    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
        xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
        xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
      <soap:Body>
        <GetItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
          <ItemShape>
            <t:BaseShape>Default</t:BaseShape>
          </ItemShape>
    
          <ItemIds>
            <t:ItemId Id="AAMkAGQ2NThhMDdjLWRhNDgtNDMyNi1hN2EyLTFhZDM2ODY0ZTg0MgBGAAAAAABIpKlLD7pLRJP86Ss+LgjTBwC4dmrE0quWQbJG0YfS+juyAAAA3WcjAAC4dmrE0quWQbJG0YfS+juyAAAA3Y6AAAA=" />
                  </ItemIds>
        </GetItem>
      </soap:Body>
    </soap:Envelope>
    

    Response:

    <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
      <s:Header>
        <h:ServerVersionInfo MajorBuildNumber="218" MajorVersion="14" MinorBuildNumber="14" MinorVersion="1" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
      </s:Header>
      <s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <m:GetItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
          <m:ResponseMessages>
            <m:GetItemResponseMessage ResponseClass="Error">
              <m:MessageText>The EWS Id is in EwsLegacyId format which is not supported by the Exchange version specified by your request. Please use the ConvertId method to convert the Id from EwsId to EwsLegacyId format.</m:MessageText>
              <m:ResponseCode>ErrorInvalidIdMalformed</m:ResponseCode>
              <m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
              <m:Items/>
            </m:GetItemResponseMessage>
          </m:ResponseMessages>
        </m:GetItemResponse>
      </s:Body>
    </s:Envelope>

    Monday, February 27, 2012 9:30 AM
  • I would recommend you start versioning your requests see http://msdn.microsoft.com/en-us/library/bb856547(v=exchg.140).aspx It looks like from the response your running Exchange 2010 SP2. If you version your request properly you should be able to use the EWSid.

    Cheers
    Glen

    Monday, February 27, 2012 9:39 AM
  • After versioning request I was able to use EWSid, but there's still the problem with: 'The specified object was not found in the store.'

    Any ideas?

    Monday, February 27, 2012 11:00 AM
  • >>"'The specified object was not found in the store"

    In general this message means that you don't have access to the particular object your trying to access check the calendar permissions if you want to test if permissions are the issue try giving the user full access to the mailbox in question temporarily with add-mailboxpermission also make sure you can access the calendar folder via Outlook.

    Cheers
    Glen

    Tuesday, February 28, 2012 1:41 AM