This demo application synchronizes user appointments with the Microsoft Exchange Web Service (EWS) using Exchange Online (bi-directionally). The application itself exports appointments from the DevExpress WinForms Scheduler control to EWS and imports EWS events to our award-winning WinForms Scheduler control.
Install the following NuGet packages:
- Microsoft.Exchange.WebServices
- Microsoft.Identity.Client
Register your application in Azure (see Register a client application in Microsoft Entra ID if you have yet to register apps on Azure). Once registered, specify tenantId
and clientId
in App.config:
<appSettings>
<add key="clientId" value="YOUR_CLIENT_ID"/>
<add key="tenantId" value="YOUT_TENANT_ID"/>
</appSettings>
The GetExchangeWebService
method (Authorization.cs) implements authorization and obtains an ExchangeService object.
NOTE
If EWS is installed on a server within a domain, review the following topic to authorize and obtain the ExchangeService object: Get started with EWS Managed API client applications.
The Synchronizer
class (Synchronizer.cs) implements sync APIs:
GetExchangeAppointments(startSearchDate, endSearchDate)
— Returns standard and recurring EWS appointments for the specified time interval.ExchangeToScheduler(appointmentStorage, exchangeAppointment)
— Imports the specified EWS appointment to the DevExpress WinForms Scheduler.SchedulerToExchange(userAppointment)
— Exports the specified user appointment from the DevExpress Scheduler to EWS.
Synchronization does not support changed occurrences if associated duration does not fall within the specified time interval.
(you will be redirected to DevExpress.com to submit your response)