Get all history (versions) of an exchange meeting using EWS - exchangewebservices

I am using EWS API to manage the exchange meetings (create/update/delete). When I retrieve an appointment there is AppointmentSequenceNumber indicating version of changed appointment in the response, is there a way to get all versions (history) of the appointment?

You can search for them in the WellKnownFolderName.RecoverableItemsVersions folder using the uid property of the Appointment see https://techcommunity.microsoft.com/t5/Exchange-Team-Blog/Holy-COW-Changes-to-Recoverable-Items-versioning-in-Exchange/ba-p/600259

Related

EWS - OnNotificationEvent => which fields were modified?

I'm getting streaming notifications from folder: 'Calendar' by using the EWS Managed API.
I have subscribed to EventTypes: Created, Moved, Modified, and Deleted.
When I get a notification where the EventType = Modified, I can read values like ItemId and ChangeKey.
My question: Is it possible to find out which fields were modified?
Or can I somehow get the previous version of the calendar item (before modified)?
Any suggestions appreciated.
No its expected in the instance that you are synchronizing changes that you would have a local version to compare any changes against. On Exchange under the recoverableItems Non_IPM_Subtree folder there is Calendar Logging folder that does store information about changes made to the calendar items but this is meant for Calendar repair/diagnostics rather then synchronization.

Exchange Web Services (EWS) - How to identify if meeting participant is mail group or individual attendee

I am using EWS (Exchange Web Services) to do various operations with outlook meeting item. One of the requirement is to fetch created meeting and identify if particular participant is mail group email address or individual attendee's email address.
I could get meeting item using FindItem / GetItem however, not sure about how exactly participant's type can be checked.
Can you please suggest if any such option available with EWS ?
Thanks,
You will need a GetItem to see the attendees of a Meeting as FindItem won't return that information. Once you have the recipients you can check the MailboxType property https://learn.microsoft.com/en-us/dotnet/api/microsoft.exchange.webservices.data.mailboxtype?redirectedfrom=MSDN&view=exchange-ews-api . If that doesn't work then try the FindPeople operation https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/findpeople-operation. If you using Office365 then doing a Graph lookup is probably a better and eaiser option to find that information.

Fields returned from EWS getItem request on Appointment are incorrect

The add-in I'm working on makes an getItem EWS request using Office.js to get certain fields otherwise unavailable. Mainly recurrence data, the all day flag, and the the body for older Exchange versions.
Depending on the environment the fields are incorrect when composing an appointment. Once the appointment is sent (if it has attendees) or saved (if it does not have attendees) then the fields are correct.
The start date and end date are a year ahead, the subject and body are empty when they shouldn't be, and the item class is always IPM.Appointment or null regardless of whether the it's a recurring appointment. Saving the appointment via Office.js before making the ews request does not make a difference. I even tried making the ews request a few minutes after I saved the appointment.
This seems to occur for some Outlook on the web users, but not for users using the Windows clients. I tried Outlook on the web with an Office 365 account, on-premise 2016, and on-premise 2013. Only the Office 365 account seems to have this issue.
My question is, is there something I can check, like the Exchange Server version, to find out if a user will run into this issue? I want to prevent using incorrect data if possible.
This scenario occurs when calling Office.context.mailbox.item.saveAsync on a new Calendar item that has not been sent yet. We are aware of this issue and are looking into a solution to resolve this so that the API can be used as designed. The API should behave as designed in Mail and on Existing Calendar items. Note that for existing Calendar items, an update may be sent out to attendees depending on the changes that the user or the add-in made in the compose form.

Exchange Web Services: Access proposed date and time through Appointment

When a meeting invitee proposes a new meeting time, in outlook this information can be found in the "Scheduling Assistant" (outlook 2007):
Is there any way to access this information programmatically through the EWS API? The RequiredAttendees and OptionalAttendees collections of the Appointment allow me to find out whether and when the attendee has responded, but how can one access the actual proposed new time?
I haven't tried this before but here is how I think you'd go about getting this information. The EWS service and the EWS Managed API don't have this implemented as first class functionality. To be more precise, the propose new time functionality is currently available as first class functionality with Exchange Online. For Exchange Online, you will need to inspect the meeting response message XML for the ProposedStartTime and ProposedEndTime elements. So if you are using Exchange 2007, 2010, and currently 2013, you will need to do what I state in the next paragraph. You should be able to access this information by using extended properties.
An attendee that proposes a new meeting time will always result in the organizer getting a meeting message. When the organizer performs a GetItem request for the meeting message sent by an attendee, the request should request the PR_RECIPIENT_PROPOSED property. A value of true indicates that the recipient proposed a new time. This should trigger a request to get the PR_RECIPIENT_PROPOSEDENDTIME and PR_RECIPIENT_PROPOSEDSTARTTIME property values.
Here is an example of getting this type of property with the EWS Managed API;
Here is a quick property definition:
ExtendedPropertyDefinition PidTagRecipientProposed = new ExtendedPropertyDefinition(0x5FE1, MapiPropertyType.Boolean);
You cannot get this information using the EWS from the Appointment, I'm afraid. It's part of the PR_MESSAGE_RECIPIENTS property, which is a MAPI table (or Object, if you will), and EWS does not support retrieving this. Technically, you could probably get it if you want to build out the ExportItem functionality (a supported function serverside that is not built into the EWS Managed API) and pick through a massive binary stream to find the information, but that's hardly feasible. I haven't tried it myself. The other alternative would be to use something other than EWS to access the data.

EWS appointment reminders

I'm getting appointment items of an account by ews as CalendarItemType object... this got an item as AppointmentState.
i looked msdn and it has only (noattendees,is meeting,recieved,cancelled,forwaded values)
but how to get reminder values(snooze,dismissed e.g) and if snoozed got snooze time
and the current status of appoinment(cancelled,deleted e.g.)
My guess is that when the user chooses to "snooze" an appointment, the property ReminderMinutesBeforeStart is changed accordingly by Outlook (note that I am referring to the EWS Managed API).