Calendar Integration setup of master calendar on MS Azure or Google

This document describes the configuration steps for either Microsoft Azure or Google Workspace. (release 11.3)

Summary Integration Setup Steps:

  • Create calendar platform credentials for Xytech.

  • Create a master calendar account on your calendar platform.

  • Configure Xytech MPSE service with the calendar integration configuration (for self-hosted sites. For Xytech hosted sites provide Technical Services with the credentials to configure).

Microsoft Graph app registration and master calendar

Create app registration in Azure

Obtain the following parameter values:

  • Tennent ID

  • Application ID (client ID)

  • Secret

  • Master calendar account email

Example Azure parameters required for Xytech

Application ID (client ID): 8003b4d8-0b09-4eb7-9daf-9d26d27806ed Secret: MdC8Q~IIgzXNaeD-7_0nvp3F4d3uu.AVNRclLame Tennent: 94fb7681-12345-6789-a3cb-ddc177452a36 Master calendar account: [email protected]

Steps using Microsoft Entra ID

  1. Manage - App Registrations - New Registration

  1. Name the application e.g. Xytech Calendar Integration. (no redirect URI required)

  2. Certificates & Secrets - create a Client Secret and make a note of it. (note the expiry date for when it needs regenerating)

  1. API Permissions - add the following permissions for Microsoft Graph

  • Calendars.Read

  • Calendars.ReadWrite

  1. Expose API - Create a scope

  1. On the overview display, also make a note of the Application (Client ID), Tennent ID

  2. Create a user account to act as the master calendar and note the email address

Google Calendar service account and master calendar

Google Service Account

This integration is intended for use with a Google Workspace account used by a business to provide calendar services to multiple individuals, not a Gmail account used by a single individual.

Example Google parameters required for Xytech

Service Account Email: [email protected] Impersonation Email: [email protected] Certificate file: xytech-integrations-000000-9d4b9b0bae83.p12 Secret: notasecret

  1. Create and configure a new Google Service Account via the Google Console at: https://console.cloud.google.com/ Go to API & Services\Credentials and add a new Service Account.

    • Note the email of the Service Account.

    • Note the Service Account Unique ID.

  2. Create a P12 key and password.

    • Download the P12 certificate file and note the file name

    • Note the password.

  1. Enable Google Calendar API (APIs and Services\Enabled APIs and services)

  1. Enable Google Workspace Domain-wide Delegation by entering the service account’s Unique ID as the Client ID, at: https://admin.google.com/ac/owl (Security\Access and Data Controls\Api Controls\Domain Wide Delegation) Allow the following scopes:

https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/calendar.events

Xytech configuration (for self-hosting customers)

Pre-reqs

Xytech App server config should be properly configured including: queue parameters for each database. e.g.

Create private queues for calendar integration (MSMQ)

  • XytechCalendar

  • XytechCalendarStatus

Enable journal (optional for diagnostic tracing) Enable security for 'everyone'

Xytech MPSE configuration

Edit the configuration file: MediaPulseServiceEngine.exe.config

Listener

Add CalendarAdaptorService and RouterQueue logging Set a suitable location value for the log files for the 'customlocation' parameter. Set level of logging for 'switchName':

  • Everything

  • InfoAndWarningsAndErrors

  • WarningsAndErrors

  • ErrorOnly

<source name="CalendarAdapterService"
		switchName="Everything"
		switchType="System.Diagnostics.SourceSwitch">
	<listeners>
		<add name="XytechListener"
			 type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
			 initializeData="FileLogWriter"
			 location="Custom"
			 customLocation="C:\Program Files\Xytech\Logs"
			 logFileCreationSchedule="Daily"
			 traceOutputOptions="DateTime"
			 maxFileSize="25000000"
			 baseFileName="CalendarAdapterService"/>
		<remove name="Default"/>
	</listeners>
</source>
			<source name="RouterQueue"
		switchName="Everything"
		switchType="System.Diagnostics.SourceSwitch">
	<listeners>
		<add name="RouterQueue"
			 type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
			 initializeData="FileLogWriter"
			 location="Custom"
			 customLocation="C:\Program Files\Xytech\Logs"
			 logFileCreationSchedule="Daily"
			 traceOutputOptions="DateTime"
			 maxFileSize="25000000"
			 baseFileName="RouterQueue"/>
		<remove name="Default"/>
	</listeners>
</source>

RouterQueue

Add a a calendar router queue. Note the name must be 'ExchangeInterface' for the MSMQ defined in the step above.

<key name="ExchangeInterface" value=".\Private$\XytechCalendar"/>

Example in context of the MPSE config:

Service Configuration for Microsoft Azure calendar

Need values for:

  • DB Name

  • REST API Base URL

  • Xytech DB System user & password

  • Queue Names

  • Azure App registration details

  • Impersonation Email - master calendar

<services>
	<service name="CalendarAdapterService" type="MediaPulse.DigitalOrderServices.CalendarAdapter.CalendarAdapter">
		<keys>
			<key name="Verbose" value="Y" />
			<key name="MpDbName" value="MP_DEMO" />
			<key name="MpRestApiUri" value="http://localhost/xytech/api/v2/database/MP_DEMO" />
			<key name="MpUsername" value="xytech" />
			<key name="MpPassword" value="password" />
			<key name="QueueName" value=".\Private$\XytechCalendar" />
			<key name="StatusQueue" value=".\Private$\XytechCalendarStatus" />
			<key name="CheckEmailIntervalInSeconds" value="30" />
			<key name="CalendarProvider" value="Exchange" />
			<key name="CalendarTokenUrl" value="https://login.microsoftonline.com/94fb7681-xxxx-42ff-a3cb-ddc177452a36/oauth2/v2.0/token" />
			<key name="CalendarBaseApiUrl" value="https://graph.microsoft.com/v1.0/" />
			<key name="CalendarGrantType" value="client_credentials" />
			<key name="CalendarScope" value="https://graph.microsoft.com/.default" />
			<key name="ClientId" value="8003b4d8-xxxx-xxxx-xxxx-9d26d27806ed" />
			<key name="ClientSecret" value="f0cea19d-xxxx-xxxx-xxxx-20139c1200dc" />
			<key name="ImpersonationEmail" value="[email protected]" />
		</keys>
	</service>
</services>

Service Configuration for Google Workspace calendar

Need values for:

  • DB Name

  • REST API Base URL

  • Xytech DB System user & password

  • Queue Names

  • Service Account Email

  • Impersonation Email (master calendar account)

  • Certificate Name

  • Certificate file Copy the certificate file into the root folder of the Xytech application – add double back-slashes.

<services>
	<service name="CalendarAdapterService" type="MediaPulse.DigitalOrderServices.CalendarAdapter.CalendarAdapter">
		<keys>
			<key name="Verbose" value="Y" />
			<key name="MpDbName" value="MP_DEMO" />
			<key name="MpRestApiUri" value="http://localhost/xytech/api/v2/database/MP_DEMO" />
			<key name="MpUsername" value="xytech" />
			<key name="MpPassword" value="password" />
			<key name="QueueName" value=".\Private$\XytechCalendar" />
			<key name="StatusQueue" value=".\Private$\XytechCalendarStatus" />
			<key name="CheckEmailIntervalInSeconds" value="30" />
			<key name="CalendarProvider" value="Google" />
			<key name="CalendarLoginUrl" value="https://accounts.google.com/o/oauth2/auth"/>
			<key name="CalendarTokenUrl" value="https://oauth2.googleapis.com/token"/>
			<key name="CalendarBaseApiUrl" value="https://www.googleapis.com/"/>
			<key name="CalendarGrantType" value="urn:ietf:params:oauth:grant-type:jwt-bearer"/>
			<key name="CalendarScope" value="https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/calendar.events"/>
			<key name="ServiceAccountEmail" value="[email protected]"/>
			<key name="ImpersonationEmail" value="[email protected]"/>
			<key name="CertificateName" value="C:\\Program Files\\Xytech\\xytechcalendarintegration-940ef64be40c.p12"/>
			<key name="CertificatePassword" value="notasecret"/>
		</keys>
	</service>
</services>

Xytech UI config key parameters

Scheduling - Preferences

Navigate to: Scheduling - Setup - Preferences Scheduling Configure Calendar Invitations using Event Triggers = true

Phases

Enable phases for calendar invites. Navigate to: Job Management - Setup - Phases Edit the details of a selected phase.

Off Types

For Off Types, like shifts, vacation, days off etc... Enable the Off Type for the Event Trigger to work. Navigate to: Scheduling - Setup - Off Types Check 'Schedule in Exchange Server' to enable the Off Type. Then create the Event Trigger

Event Triggers

Setup Event Triggers as needed for Insert, Update triggers. Note: Deletion is handled automatically, no Event Trigger is required. Upon deleting a transaction that has sent an invite, and deletion for that invite will automatically be sent. - Event Code: (unimportant what the text is, use something to identify similar triggers) - Send to queue: no - Notify Type: Invite

Personnel Scheduling Resource setup: Assign email and E-Mail Booking

Last updated