Skip to content

This example synchronizes WinForms Scheduler appointments with the Microsoft Exchange Web Service (EWS) using Exchange Online (bi-directionally).

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/winforms-scheduler-sync-with-ews

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synchronize User Appointments with Microsoft EWS using Exchange Online

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.

Get Started (Prerequisites)

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>

Implementation Details

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.

Limitations

Synchronization does not support changed occurrences if associated duration does not fall within the specified time interval.

Files to Review

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

This example synchronizes WinForms Scheduler appointments with the Microsoft Exchange Web Service (EWS) using Exchange Online (bi-directionally).

Topics

Resources

License

Stars

Watchers

Forks