I’ve just posted K2 Exchange OOFSettings service broker at K2 Community site. This broker uses the EWS Managed API to access the Out-of-Office information on the Exchange server.
Where to get the broker?
The broker can be downloaded from:
Limitations of the K2 Exchange OOFSettings broker
This is the list of limitations of this broker:
- Since the EWS API requires the user’s login name and password to execute the web service, the broker needs to run under SSO authentication mode. The selected authentication mode must be an AD security provider.
- The email address will be retrieved via the System.DirectoryService.AccountManagement API, so make sure the user has a valid email address in AD.
- When UseAutoDiscover service key is set to true, the broker will make use of the user’s email address to auto discover the Exchange server’s URL. See the following link on how to configure auto discover service for Exchange. https://technet.microsoft.com/en-SG/library/bb201695(v=exchg.141).aspx.
Service Instance Setup
As the broker requires the user’s login name and password to execute the EWS call, the service instance must be set up to use SSO Authentication Method and and AD security provider (by default, K2) must be selected.

The following are the description for the service keys:

- UseAutoDiscover – Whether to lookup the URL using the Auto Discover service.
- RequireHTTPS – Whether to enforce that the Exchange server’s URL needs to use the HTTPS scheme.
- EwsURLFallback – The Exchange server’s EWS URL to be used when the broker fails to get a valid response from the Auto Discover service or when the UseAutoDiscover key is set to false.
Available Methods in K2 Exchange OOFSettings broker
This is the list of methods available:
Get OOF Settings
This method grabs the current selected user’s out of office settings from the Exchange server.

Turn On OOF Notification with Schedule
This method allows the user to turn on the out of office notification, set the reply email content and most importantly set the start and end date/time.

Turn On OOF Notification Permanently
Well, this method is the same as the previous one, except that there is no start and end date/time defined. It will be turned on as long as required.

Turn Off OOF Notification
This method will turn off the out of office notification.

Have Fun!