The New JoomBoost: Joomla 6, Better Support and More Extensions
JoomBoost

Outlook Calendar

Easy Services Booking can sync each resource with one Outlook calendar, in both directions:

  • To Outlook. New and changed bookings are written to the resource's Outlook calendar. Cancelled and deleted bookings are removed from it.
  • From Outlook. Events in that Outlook calendar block the same time in Easy Services Booking, so clients cannot book it. This part is optional.

The sync runs through the Microsoft Graph API with your own app in Microsoft Entra. Easy Services Booking links to one Microsoft account. All resources use that account, each with its own calendar. A cron job calls the sync URL every few minutes and does the work.

Outlook Calendar sync is new in 6.3.0. It works next to Google Calendar: you can use one, the other or both.

What you need

  • A Microsoft account with an Outlook calendar: a Microsoft 365 work or school account (Exchange Online), or a personal Outlook.com account.
  • Access to Microsoft Entra (portal.azure.com or entra.microsoft.com) to register an app. A personal Microsoft account can register apps too.
  • Your site on https. Microsoft accepts only https redirect addresses, except for localhost.
  • A cron job, or a service such as EasyCron, that calls the sync URL. See Cron jobs.
  • Super User rights in Joomla. Only Super Users can link or unlink the Microsoft account.

Part 1: register an app in Microsoft Entra (once)

  1. Sign in to the Microsoft Entra admin center (entra.microsoft.com) or the Azure portal (portal.azure.com) with the account that may register apps.

  2. Go to App registrations and click New registration.

  3. Enter a Name, for example "Easy Services Booking - example.com".

  4. Under Supported account types, choose who may sign in. This decides the Tenant value you enter later:

    Supported account types Tenant in Easy Services Booking
    Accounts in any organizational directory and personal Microsoft accounts common (the default)
    Accounts in any organizational directory (multitenant) organizations
    Accounts in this organizational directory only (single tenant) Your Directory (tenant) ID or your domain, for example contoso.onmicrosoft.com
    Personal Microsoft accounts only consumers

    For a Microsoft 365 business, single tenant is the usual choice. For a personal Outlook.com account, choose one of the options that include personal accounts.

  5. Under Redirect URI, choose Web and paste the redirect URI of your site:

    https://www.example.com/administrator/index.php?option=com_easyservicesbooking&task=configuration.outlookredirect

    Use your own domain, and the folder if Joomla is in one. The exact URI is shown in a box on the Outlook Calendar tab of the Configuration page. Copy it from there so it matches letter for letter.

  6. Click Register. On the app's Overview page, copy the Application (client) ID. For a single tenant app, also copy the Directory (tenant) ID.

  7. Open Certificates & secrets, click New client secret, enter a description, choose when it expires and click Add. Copy the Value at once. Microsoft shows it only once. Do not copy the Secret ID.

  8. Open API permissions and click Add a permission > Microsoft Graph > Delegated permissions. Tick Calendars.ReadWrite, User.Read and offline_access, then click Add permissions. User.Read is often there already.

  9. If your organisation does not let users consent to apps themselves, click Grant admin consent for your organisation. You need an administrator role for this.

The client secret expires on the date you chose. Before that date, create a new secret and enter it in Options, or the sync stops.

Part 2: enter the app details in Options

  1. Go to Components > Easy Services Booking and click Options in the toolbar.

  2. Open the Outlook Calendar tab.

  3. Fill in:

    Setting What to enter
    Application (Client) ID The Application (client) ID from the app's Overview page
    Client Secret The secret Value from Certificates & secrets
    Tenant common (default), organizations, consumers, or your tenant ID or domain. See the table in Part 1
  4. Click Save & Close.

  1. Go to Components > Easy Services Booking > Configuration and open the Outlook Calendar tab.
  2. Set Enable Outlook Calendar to Yes. Bookings of resources that have an Outlook calendar are then sent to it.
  3. Set Block Busy Outlook Times to Yes if events in Outlook should block booking slots. Events shown as Free in Outlook never block time.
  4. With Block Busy Outlook Times on, choose Read Ahead: how far ahead Outlook events are read, from One Month to Six Months. The default is Three Months.
  5. Click Save & Close, then open Configuration and the Outlook Calendar tab again.
  6. Click Link Microsoft Account. Sign in with the Microsoft account whose calendars you want to use, and accept the permissions.
  7. You come back to the Outlook Calendar tab with the message "Outlook Calendar is linked to" and the account. The box at the top says Linked as and the account.

The Link Microsoft Account button shows only for Super Users, and only after the Client ID and Client Secret are saved in Options. Until then the tab shows the steps to register the app.

To use another account, click Link Again. To stop the sync, click Unlink Microsoft Account. Unlinking removes the busy times read from Outlook so far. Bookings already written to Outlook stay in the Outlook calendar.

Part 4: choose a calendar for each resource

  1. Go to Resources and open a resource.
  2. Under Calendar Integration Options, set Sync with Outlook Calendar to Yes.
  3. In Outlook Calendar, choose the calendar for this resource. The list shows the calendars of the linked account. Calendars you cannot write to are marked "read only": do not choose those.
  4. Save. Repeat for each resource that should sync.

Use a separate Outlook calendar for each resource, so their events do not block each other.

The Calendar Integration Options block shows only when Google Calendar or Outlook Calendar is turned on in the Configuration page. If the list says "Turn on Outlook Calendar in Configuration first" or "Link a Microsoft account in Configuration > Outlook Calendar first", finish Part 3.

Part 5: the sync plugin and the cron job

  1. Go to System > Manage > Plugins and search for Easy Services Booking - Sync Events Plugin. It must be enabled: it puts each saved booking in the sync queue. It is enabled on new installs from 6.3.0. A site updated from an older version keeps the state it had, so check it. The Outlook Calendar tab shows a warning while the plugin is disabled.

  2. Create a cron job that calls Your Calendar Sync URL every 5 to 15 minutes. The URL is shown at the bottom of the Outlook Calendar tab and on the Google Calendar Settings tab. It is the same URL for Google and Outlook:

    https://www.example.com/index.php?option=com_easyservicesbooking&task=cron.sync&google_cal_sync_secret=YOURSECRET&format=raw

    See Cron jobs or EasyCron.

The URL needs the Sync Secret from the Google Calendar Settings tab. If the secret is empty, a random one is created when you save the Configuration page. Until then the tab says "Save this screen once to create the sync secret, then the URL appears here."

Open the URL in your browser once to test it. It shows "Calendar Sync Scheduled Task", then an Outlook Calendar part with each step, for example "Booking 42 needs create" and "success", and per resource how many busy times were created, updated and removed.

What is synced

From Easy Services Booking to Outlook

  • Each time a booking is created, changed, confirmed, cancelled or deleted, it joins the sync queue. The next cron run sends it to Outlook. Bookings made before you turned the sync on are sent the next time they are saved.
  • The Outlook event title is the booking title, see What the booking title shows. The event body holds the booking details as plain text.
  • The event is marked Busy and has no Outlook reminder. Times are sent in UTC; Outlook shows them in the time zone of the calendar owner.
  • Clients are not added as attendees, so Outlook sends them no invitation. Clients get the emails of Easy Services Booking as usual.
  • A deleted or cancelled booking is removed from Outlook: deleted in Manage Diaries, in the front-end diary or in the Bookings list, or cancelled by the client in self service. Tools > Delete Old Events removes past bookings from Easy Services Booking only; their events stay in Outlook.
  • If you delete a booking's event in Outlook, it is created again the next time the booking is saved.
  • A booking that fails to sync stays in the queue and is tried again at each cron run, up to 24 times. Saving the booking again starts the count again.

From Outlook to Easy Services Booking

With Block Busy Outlook Times on, each cron run reads the events in the Read Ahead period from the calendar of every resource that syncs with Outlook.

  • Each event blocks its time on the resource. These busy times show in Manage Diaries and the Bookings list, and cannot be edited there.
  • Events shown as Free in Outlook and cancelled events are skipped.
  • All-day events block the whole day, in the time zone of your site. Events over several days block each day.
  • Each occurrence of a repeating event blocks its own time.
  • When you move, rename or delete an event in Outlook, or set it to Free, the busy time is updated or removed at the next run.
  • Events that Easy Services Booking wrote to Outlook itself are not read back as busy times.

The subject and organiser of Outlook events are stored with the busy time and show in the diary. Keep this in mind if the calendar holds private appointments.

Troubleshooting

What you see What to check
"The link request could not be verified (it expired or did not start from this site). Click the Link button again." Start the link with the Link Microsoft Account button and finish it in the same browser, without a long pause. Do not open a saved Microsoft sign-in link
"The account was not linked." with access_denied The permissions were not accepted. Link again and accept them, or ask your Microsoft 365 administrator to grant admin consent (Part 1, step 9)
"Need admin approval" at Microsoft Your organisation blocks user consent. An administrator must click Grant admin consent in the app's API permissions
"Microsoft did not send a refresh token" The app lacks the offline_access permission. Add it (Part 1, step 8), then click Link Again
AADSTS50011 (redirect URI mismatch) The redirect URI in the Entra app is not exactly the one on the Outlook Calendar tab. Check https, www, the folder and the whole query string
AADSTS700016 (application not found) The Application (Client) ID is wrong, or the Tenant points at another directory
AADSTS7000215 (invalid client secret) You entered the Secret ID instead of the secret Value, or a typo. Create a new secret and paste its Value
AADSTS7000222 (client secret expired) Create a new client secret in Entra and enter it in Options
AADSTS50194 or an error about a single tenant app The app allows only your organisation, but Tenant is common. Enter your tenant ID or domain in Tenant
Personal Outlook.com account refused The app's Supported account types must include personal Microsoft accounts, and Tenant must be common or consumers
Email "Outlook Calendar Sync Problems", or "Outlook connection failed" in the sync output The link no longer works: the password changed, access was revoked, or the link was not used for a long time. Click Link Again. If that fails, click Unlink Microsoft Account and then Link Microsoft Account
"Could not read the Outlook calendars" in the resource form The link no longer works, see the row above
"Invalid secret" The secret in the cron URL is not the Sync Secret of the Configuration page
"Sync not enabled" Both Enable Google Calendar Integration and Enable Outlook Calendar are off
Bookings do not reach Outlook The Sync Events Plugin is enabled, Enable Outlook Calendar is Yes, the resource has Sync with Outlook Calendar set to Yes and a calendar chosen, the calendar is not read only, and the cron job runs
Outlook events do not block slots Block Busy Outlook Times is Yes, the event is inside the Read Ahead period, it is not shown as Free, and the cron job runs

The sync output of the cron URL shows the Microsoft error text for each failed step. Open the URL in your browser to read it.

All Extensions