Gaurav Diwanji
ServiceNow Employee
ServiceNow Employee

Notes/ Updates based on newer versions:

  • Starting August 4, 2022 release of the application, all space records can be synced with Outlook, as opposed to only Room records.


The Workplace Calendar Synchronization application lets users reserve room resources with ServiceNow® Workplace Reservation Management or their organization's calendar service providers such as Microsoft Exchange Online or Google calendar. Reservations made in either application synchronize with the other making reserving rooms for meetings easy, regardless of where the reservation is.

This article will explore setting up the Workplace Calendar Synchronization to sync room reservation information with Microsoft Exchange and discuss some tips related to this integration.

The Workplace Reservation product is constantly improving with enhancements and defect fixes through quarterly releases. Given the pace of these updates, this article is meant to be used as a reference, with the Product Documentation being the source of truth.


NOTE: This article covers version 2.0 and onwards of the Workplace Calendar Synchronization application. Version 2.0 is a redesigned iteration of the application which leverages the MS Exchange Online spoke. Previous application versions will have different configuration steps found in the product docs. Links in this article point to the San Diego release documentation to cover the most recent updates, however, screenshots below are captured in a Rome instance.

Table of Contents

Setting up the Integration in MS Exchange

Setting up the Integration in ServiceNow

Setting up Reservation Synch Configurations in ServiceNow

Testing: making sure it works

FAQs

Setting up the Integration in MS Exchange

Resource configuration in MS Exchange

This integration synchronizes 'Room' records in SN with ‘Resources’ created in MS Exchange.

NOTE: In the current app version (Workplace Calendar Synchronization version 2.0.4), this integration only supports MS Exchange resources that get auto accepted, if they are available. Resources requiring approvals in MS Exchange are not supported.

If your organization does not have resources configured, please follow the steps below to create Resources in MS Exchange. If you already have resources set up for rooms, you can skip this step and note down the email addresses for each of these resources.

Microsoft currently communicates the following: https://docs.microsoft.com/en-us/Exchange/recipients/room-mailboxes?redirectedfrom=MSDN&view=exchser... 

1.) As an MS Admin, navigate to Resources > Rooms and equipment > Add resource

find_real_file.png

find_real_file.png

2.) Create a new resource and note down the email address for it.

find_real_file.png


Return to Table of Contents

Configuring OAuth Credentials

Perform the steps below to register ServiceNow as an OAuth client in MS Exchange. The credentials obtained here will be used in the Spoke configuration in ServiceNow. More details on these steps can be found at the link here.

  1. In the Microsoft Azure portal, search app registration and create a new app registration for ServiceNow.

  2. Note down the Application (client) ID and Directory (tenant) ID for this app.

  3. For the new app, in the Authentication section add a platform ‘Web’ and add the Redirect URIs in this format: https://<instance-name>.service-now.com/oauth_redirect.do

  4. For the new app, in the ‘Certificates and secrets’ section, create a new client secret and copy it to the clipboard.

  5. For the new app, in the ‘API permissions’ section, select Microsoft Graph and grant the below Application permissions:
Calendars.Read Read the room calendars
Calendars.ReadWrite Read and write reservations users’ calendar
Calendars.Read.Shared Only needed in case strict mode is used
The user that will be used needs to be a delegate for the room resource, this is done in the Office portal not the Azure portal.
Strict mode: The system is not able to make a reservation directly in the users’ calendar, but the user will be invited.
offline_access For ServiceNow to request Refresh tokens, which are used to request new access tokens when the current one becomes invalidated


6. Record the Client Secret, Client ID, and Directory ID for use in configurations made in ServiceNow.

Return to Table of Contents

Setting up the Integration in ServiceNow

Install Plugins in ServiceNow

Install the below plugin versions or newer in the following order:

1. Microsoft Exchange Online Spoke (version 3.2.1 or later)
find_real_file.png
2. IHUB Spoke Util Pack

find_real_file.png
3. Workplace Calendar Synchronization (version 2.0.4 or later)

find_real_file.png

 


If you install Exchange Online Spoke after the Workplace Calendar Synchronization application, please repair the Workplace Calendar Synchronization application before continuing. This step is needed as there are some scripts that the Workplace Calendar Synchronization installation runs only if it finds the MS Exchange Spoke installed.

NOTE: These plugins are in addition to the Workplace Reservation Management application being installed and Rooms configured for making a reservation. We will use demo data for setting up this integration.

Return to Table of Contents

Set up Microsoft Exchange Online Spoke in ServiceNow

Next, we will set up the Microsoft Exchange Online Spoke, which is a dependency for this integration. Product Documentation detailing this spoke can be found here.

Register Microsoft Exchange Online as OAuth Provider

  1. Navigate to All > System OAuth > Application Registry.

  2. Open the record: Microsoft Exchange Online.

  3. Change the scope to Microsoft Exchange Online Spoke and update values for fields: Client ID, Client Secret,
    Authorization URL (https://login.microsoftonline.com/<Directory-ID>/oauth2/v2.0/authorize),
    Token URL (https://login.microsoftonline.com/<Directory-ID>/oauth2/v2.0/token),
    Redirect URL (https://<instance-name>.service-now.com/oauth_redirect.do), and Save.
    These values should have been obtained from the MS Exchange admin, as noted in the previous step.

find_real_file.png

Return to Table of Contents 

Configure Microsoft Exchange Online_clientCredentials

  1. All > System OAuth > Application Registry

  2. Open the record: Microsoft Exchange Online_clientCredentials.

  3. Change the scope to Microsoft Exchange Online Spoke and update values for fields: Client ID, Client Secret,
    Authorization URL (https://login.microsoftonline.com/<Directory-ID>/oauth2/v2.0/authorize),
    Token URL (https://login.microsoftonline.com/<Directory-ID>/oauth2/v2.0/token),
    Redirect URL (https://<instance-name>.service-now.com/oauth_redirect.do), and Save.
    These values should have been obtained from the MS Exchange admin, as noted in the previous step.

find_real_file.png

 

Return to Table of Contents

Configure Connection Credentials for MS Graph

  1. Change Scope to Workplace Calendar Synchronization

  2. Navigate to: Connections & Credentials > Credentials

    find_real_file.png

  3. For each of the records MS Graph 1 and MS Graph 2 perform the below steps:

a. Set OAuth Entity Profile to Microsoft Exchange Online_clientCredentials default_profile and save.

find_real_file.png

find_real_file.png 

 b. Click Get OAuth Token Related Link to ensure the connection is successful.

find_real_file.png

Return to Table of Contents

Create Webhook Registry

Create a webhook registry connection to generate subscriptions for events coming from MS Exchange Resources. These event subscriptions are used to sync up the information being sent from MS Exchange with rooms in ServiceNow.

  1. Navigate to Microsoft Exchange Online Spoke > Webhook Registry

  2. Open the record WSDRS Event Subscription.
    find_real_file.png

  3. Click on the Callback URL UI Action button.

    find_real_file.png


This will refresh the callback URL and Client state values.

find_real_file.png

NOTE: This step will need to be performed after each clone down since this value needs to be specific to the instance.

Return to Table of Contents


Setting up Reservation Synch Configurations in ServiceNow

We will now configure the Workplace Calendar Synchronization application. In the following steps, we configure SN Workplace Calendar Sync application to use Microsoft Graph and the connections previously configured as the external Calendar provider for this integration.

NOTE: As of the current version (Workplace Calendar Synchronization version 2.0.4), only 'Rooms' are synced; workspace records currently do not get synced with MS Calendar or have MS exchange emails sent out.

Create a Calendar Provider

Product documentation can be found here.

  1. Navigate to Workplace Calendar Synchronization > Calendar Providers > New

    find_real_file.png

  2. Enter the Name, Sync Start and End times, select Microsoft Graph as the Calendar Processor, and click submit.

    find_real_file.png

If the synchronize past reservation flag is checked, it will bring in historical reservations for the Outlook resources defined in the next steps since the sync start date.

Return to Table of Contents

Reservable Sync Configuration

We will now link Rooms in ServiceNow to Resources in MS Exchange through their email addresses.

To achieve this, create a Reservation Sync Configuration record for each MS Exchange Resource and the corresponding room it needs to be synchronized within SN WSD.

As a part of this walkthrough, we will sync three rooms in SN WSD:

 find_real_file.png

These rooms must be defined as resources in Exchange, and we need their resource email addresses.

1.) Open the Calendar Provider we just configured > Related List > Reservable Sync Configurations > New

find_real_file.png

Alternatively, we can navigate to Workplace Calendar Synchronization > Reservable Sync Configuration > New

find_real_file.png

2.) Create the reservation sync record by selecting the room, reservable module it should apply to, and the resource's email address.

This step needs to be performed for all rooms.

 find_real_file.png


NOTE: Personalize the list view to include the 'Subscription' column.

Once a reservable sync configuration record is created, a flow will populate the value populate for the 'Subscription' column. This subscription acts as a listener for events on that resource.

To refresh the subscription for all Rooms, uncheck the Active Flag on the Calendar Provider record and save. This will trigger flows to clear out the 'Subscription' field value for all associated 'Reservable Sync Configuration' records.
Check the activate flag and save once all these subscriptions have been cleared out. This will trigger flows to recreate subscriptions for the 'Reservable Sync Configuration' records.

To recreate a subscription for an individual room, deactivate and activate the 'Reservable Sync Configuration' record.

Recreating subscriptions may be needed after repopulating Call back URL in the Webhook registry after a clone down. It may also be needed if SN is not receiving events back from MS Exchange.

 find_real_file.png

The Outlook Calendar sync is now configured for these three rooms.

Any reservation made in SN WSD will flow out and block the resource out in MS Exchange and vice versa.

NOTE: As of the current version (Workplace Calendar Synchronization version 2.0.4), MS Exchange resources with approvals enabled are not supported by the SN WSD sync. The recommendation is to have MS Exchange auto-accept all resource requests if the resource is available.

Starting May 2022 WSD release, the recommendation is to move all approvals to SN WSD, and MS Exchange will continue to auto-accept all resource requests.
In that release, when a user will make a reservation for a resource in MS Exchange, it will be 'Accepted' in Exchange, and it will trigger an approval workflow in SN WSD (if the room is configured to need approval). If approved in WSD, the Exchange resource status stays 'Accepted.' If this reservation request is rejected in WSD, then SN will 'Cancel' the reservation for the MS Exchange.

 Return to Table of Contents

Properties
The properties used to configure this integration are linked here.

sn_wsd_rsvsync.use_user_default_tz and sn_wsd_rsvsync.use_default_tz can be used to tweak the time zones for the reservation events sent out to MS Exchange.

If the value for the property sn_wsd_rsvsync.use_default_tz is not 'user' or 'building', users will see the events correctly in their outlook calendar, but these outlook events may show a different time zone when these events are opened in Outlook.

 Return to Table of Contents

Testing: making sure it works

Reservations made in SN Workplace Reservation Management

Room reservations created in ServiceNow sync will create MS Exchange calendar events if there are resources associated with them. These events will show up on the Outlook Calendar of the user who made this reservation.

1.) Identify and impersonate a test user who has their sys_user record email set to an MS Exchange email account and has the Workplace user role.

2.) Make a reservation in one of the rooms configured above; in our case, let's use Dublin.

find_real_file.png

 

find_real_file.png

 



This will trigger an event to MS Exchange, and the status will be 'Awaiting confirmation.

find_real_file.png


Once SN gets an event from MS exchange (within minutes), this status is changed to 'Confirmed.'

find_real_file.png


The user receives an 'Accepted' email for the resource requested (not the times are different since the Outlook time is different from the Building time in WSD).

 find_real_file.png

NOTE: If the status remains 'Awaiting confirmation' long after the user receives an 'Accepted' email from the MS exchange, it points to SN not hearing back from the MS exchange, which may be because of issues with the subscription the calendar sync configuration. We will need to recreate subscriptions as detailed previously.

Return to Table of Contents

Reservations made in MS Exchange

When a resource is booked in Outlook and there is a room associated with it in ServiceNow Workplace Sync configuration, in that case, the booking event will flow over to SN and create a Reservation record.

1.) Using the same test user as above, create a reservation for an Outlook resource synced in SN.

find_real_file.png

This reservation will flow into SN as a confirmed reservation.

find_real_file.png


Return to Table of Contents

Cancellations

When an event in MS Exchange that created a reservation in SN gets canceled in Outlook, the associated reservation in ServiceNow also gets canceled.

1.) Cancel the booking event created previously in the Outlook calendar.

find_real_file.png

2.) The Cancellation event flows over to SN.

 find_real_file.png


Similarly, when a room reservation that was created in SN is canceled in SN, the associated calendar event that was created in MS Exchange is deleted.

find_real_file.png 

NOTE: As of the current app version (Workplace Calendar Synchronization version 2.0.4), SN WSD cannot be used to cancel or edit a resource booking event that was created in Outlook. It will need to be canceled within Outlook, and the Cancellation will flow over to SN and be reflected on the associated reservation as noted above.

Return to Table of Contents

Repeating Reservations made in MS Exchange

Repeating resource bookings created in MS Exchange flow into SN as occurrences for recurring reservations.

1.) Using the same test user as above, create a repeating reservation in the Outlook calendar for one of the resources synced with SN WSD.

 find_real_file.png

2.) Ensure that it creates a series of reservations in SN WSD.

find_real_file.png 


Return to Table of Contents

FAQs

Can I further restrict SN’s access to MS Calendar?
We can configure ‘Strict mode’ on the Calendar Provider record so that all reservations created in WSD that sync with Outlook will be created on behalf of a 'dedicated' reservation account and the employee is invited to that reservation instead of making the reservations directly as the user.

If the option is enabled, employees cannot update or cancel this reservation using the calendar service. They can only make changes using the Workplace Reservation Management application.

This is a more secure setup, as we only have access to that dedicated reservation account, besides the rooms. This mode only affects the reservations created in WSD and reservations created in Outlook will still be created on behalf of the employees themselves.

Setting up Restricted Mode requires certain additional delegate API permissions and additional config on the provider.

Additional fields to be configured on Calendar Provider:

Strict mode: Option to restrict emails so that employees do not directly receive emails. Instead, notifications are sent to a single email address at the organization. The system is not able to make a reservation directly in the users’ calendar, but the user will be invited.

Strict mode email: The email address that is used to create reservations and to receive reservation-related notifications if the Strict mode is enabled. Employees are considered invitees to the reservation.

Additional configuration needed at Room level in MS Office:
As MS Office admin, booking delegates need to be defined for all resources. The delegated user for all resources synched with SN WSD must be the account with the Strict mode email address configured previously.

Additional configuration needed in MS Azure:
Please refer to the app permissions section of Azure configuration steps noted previously.

How do I work with resources that need approvals in MS Outlook?
See details linked in the notes here.

If MS Outlook Booking delegates are required by your organization, then they will need to be turned on for all resources and we can explore using the strict mode as detailed above.

 

I just cloned my instance, and the integration is no longer working in my lower environments.
See details linked in notes here.

 

My reservation is stuck in an ‘Awaiting Confirmation’ state.
See details in notes here.

 

The subject for meetings created in Outlook shows the username as the subject instead of the Event title.
In some instances, the meeting's subject name always changes the organizer's name, after it has been accepted in Exchange and then synced with ServiceNow. Also, private flags are not accepted by Exchange by default. This is a default configuration in Exchange, but this can be changed by the MS Exchange administrator using Windows PowerShell. They would need to change the DeleteSubject, RemovePrivateProperty , and AddOrganizerToSubject Fields to False for all resource mailboxes.

Microsoft currently communicates the following: https://docs.microsoft.com/en-US/exchange/troubleshoot/client-connectivity/calendar-shows-organizer-...

 

How do we upgrade from version 1.x (non-Spoke) of the Workplace Calendar Synchronization application to version 2.x (using Spoke)?
Please execute the installation in the following order.

1. Install the Exchange Online Spoke
2. Upgrade the Workplace Calendar Synchronization application.
3. Configure the MS Exchange Online Spoke as detailed above.

If you install Exchange Online Spoke after the Workplace Calendar Synchronization application, please repair the Workplace Calendar Synchronization application before continuing. This step is needed as there are some scripts that the Workplace Calendar Synchronization installation runs only if it finds the MS Exchange Spoke installed.

Version 2.0 contains a fix script to migrate the existing provider and sync configuration records. In case the script was not executed correctly, the admin can de-activate (active=false) and activate (active=true) the configuration for the calendar provider to refresh subscriptions as detailed here previously.

 

How do I control the time zone for the invites sent out to my Outlook calendar?
This can be controlled by properties defined in the Workplace Calendar Synchronization application as detailed previously here.

 

For reservations created in SN WSD, at what points are events triggered to MS Exchange?

Assuming a valid reservable sync configuration has been set up for these rooms:

  • If the room requires approval in SN, an event is sent to MS Exchange when the reservation is ‘approved’. No activity in Outlook when SN reservation is in a status of ‘awaiting approval’ or ‘rejected’.
  • For WSD rooms that do not need approval, the event is sent to MS Exchange immediately when the reservation is made.
  • An event is sent for Cancellations of room reservations.

Return to Table of Contents

Comments
chandan6
Mega Explorer

Hello Gaurav,

 

We followed each step from this article but we are not getting any subscription id in the reservable sync configuration.

 

In Create or Update subscription flow we are getting the error "Subscribe Webhook action failed for reason: Provided resource is invalid.". But the resource email id looks good.

 

Do we need to add any manifest files on the outlook side? or Do we need to do any configuration on the outlook side?

 

Any help will be much appreciated!

Gaurav Diwanji
ServiceNow Employee
ServiceNow Employee

If you have already validated the plugin versions and the rest of the MS Exchange Spoke configuration in ServiceNow, you may want to check the OAuth Application permissions granted to ServiceNow in MS Exchange as noted here: https://docs.servicenow.com/bundle/sandiego-application-development/page/administer/integrationhub-s...

If all the permissions are valid and it still does not update subscriptions, I would recommend a support case to help with troubleshooting.

Adam L4
Tera Contributor

Does this calendar syncing work with MS Exchange On Premise, or only MS Exchange Online (aka Office 365)?

Gaurav Diwanji
ServiceNow Employee
ServiceNow Employee

Hi Adam --

The WSD Calendar Sync is built using the MS Exchange Online Spoke capabilities and does not work with support On-prem Exchange servers.

March 2024 Edit: on On-Prem Calendar Sync now being available: https://docs.servicenow.com/bundle/vancouver-employee-service-management/page/product/workplace-cale...

An Le
Mega Sage

Hi @Gaurav Diwanji ,

I followed all the steps but I got this error when trying to sync location com.glide.communications.ProcessingException:Problem retrieving authentication profile

Ali Jubran1
Tera Contributor

Hi @Gaurav Diwanji  is it possible to limit reservations only be made in WSD? But still sync with Exchange?

Matt Forder
Tera Expert

Hi @Gaurav Diwanji ,

 

Thanks for providing this guide - while respecting your comment "...this article is meant to be used as a reference, with the Product Documentation being the source of truth"  the unfortunate truth is that the product documentation for Workplace Calendar Synchronisation is incredibly difficult to follow and in some cases misleading e.g. step 3b of the procedure on the page "Create a connection with Microsoft Online spoke" is basically unintelligible, and I can't find any references in the docs to the need to create web hooks as per your guide above.

Could I please encourage your product team to invest some time in improving the product documentation?

Matt Forder
Tera Expert

@Gaurav Diwanji - the link you have provided in the below doesn't seem to be working - could you please the link to the notes mentioned below?


My reservation is stuck in an ‘Awaiting Confirmation’ state.
See details in notes here.

Marnieb
Tera Contributor

@Gaurav Diwanji,
If a reservation is made in Outlook, is it possible to enable cancellations or editing (change time/location) for the reservation within the WSD side?

Gaurav Diwanji
ServiceNow Employee
ServiceNow Employee

@Marnieb: (Edited) The product team is working on the ability to edit/cancel reservations made in one system from another one. Currently it needs to be modified in the system in which it was created.

Gaurav Diwanji
ServiceNow Employee
ServiceNow Employee

@Matt Forder Thank you for the feedback, I have sent over your notes to the docs team for reviewing any gaps that may exist.

Apologies for the broken link - all internal page anchors were broken when Community was re-platformed a couple of months back and it won't let me create internal links anymore.
This is where the link was supposed to take you (it's within the same article):

GauravDiwanji_0-1685563591797.png

 

Gaurav Diwanji
ServiceNow Employee
ServiceNow Employee

@Ali Jubran1 : That would be a question for the customer's exchange team if they can restrict reservations through exchange somehow. I am sure there are rules they can apply in exchange to achieve that while still keeping the resources (rooms) synced with SN WSD.

Gaurav Diwanji
ServiceNow Employee
ServiceNow Employee

@An Le : Unfortunately this isn't an error I have encountered previous. Hope you were able to get it resolved with help from the support team.

Marnieb
Tera Contributor

@Gaurav Diwanji We have a situation where the subscription codes are expiring essentially every week and disrupting the WSD/Exchange connection forcing us to re-generate the subscription codes every week. Is there something we missed upon set up on either the WSD or Exchange side? Any assistance would be greatly appreciated! Thank you. 

aditya6004
Tera Contributor

We are integrating Walkup experience with Outlook calendar. While following servicenow document to Setup Microsoft Exchange Online Spoke, there is once step and it requires to install Powershell EXO V2 module. Please help on this if you have any idea on how we can proceed with it.

Thanks!

Raj_Esh
Kilo Sage
Kilo Sage

Hi @Gaurav Diwanji 

 

Can you please update the links in the document, looks like links are broken. 

Also, would like to know if any change in the configuration since the article is from 2022.

 

Thank you very much.!

Harneet Sital
Mega Sage
Mega Sage

Hey @Gaurav Diwanji , the detailed explanation helps thank you. 

Question, can we enable this integration to two different Microsoft tenants? Consider a case where the room is shared so can we setup two outlook email addresses and mark the room booked in both?

Shweta9
Tera Explorer

Hello @Gaurav Diwanji 
Thank you for the detailed information.
As you have mentioned, App version (Workplace Calendar Synchronization version 2.0.4), SN WSD cannot be used to cancel or edit a resource booking event that was created in Outlook. 
The product team is working on the ability to edit/cancel reservations made in one system from another one.

Could you please confirm if the functionality to 'edit/cancel reservations made in one system from another one' is now available in later versions of Workplace Calendar Synchronization version 2.0.4.

Currently, we are not able to cancel reservations from outlook when reservations are cancelled from SN, and vice versa.
Thank you

Version history
Last update:
‎02-01-2023 04:11 PM
Updated by:
Contributors