For this server, when a user attempts to book a room in Exchange, the room auto replies with an accept/decline. I am trying to replicate this process in EWS - using a service account to request a room meeting with a user attendee and a room resource. In order to have the room auto-reply to the user, and not the service account, do I need to use impersonation, or is there any other process? I am using php-ews for this, but any help in any language or what the SOAP request should contain would be greatly helpful.
1 Answers
0
votes
You could request meeting using the below code:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010" />
</soap:Header>
<soap:Body>
<m:CreateItem SendMeetingInvitations="SendToAllAndSaveCopy">
<m:Items>
<t:CalendarItem>
<t:Subject>Status Meeting</t:Subject>
<t:Body BodyType="Text">The purpose of this meeting is to discuss project status.</t:Body>
<t:Start>2009-03-01T17:00:00Z</t:Start>
<t:End>2009-03-01T19:00:00Z</t:End>
<t:Location>Conf Room</t:Location>
<t:RequiredAttendees>
<t:Attendee>
<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>
</t:Mailbox>
</t:Attendee>
<t:Attendee>
<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>
</t:Mailbox>
</t:Attendee>
</t:RequiredAttendees>
<t:OptionalAttendees>
<t:Attendee>
<t:Mailbox>
<t:EmailAddress>[email protected]</t:EmailAddress>
</t:Mailbox>
</t:Attendee>
</t:OptionalAttendees>
</t:CalendarItem>
</m:Items>
</m:CreateItem>
</soap:Body>
</soap:Envelope>
For more information, please refer to these links:
Creating appointments and meetings by using the EWS Managed API 2.0
Exchange Web Services Create Meeting Request Working Example