#8318 Microsoft plugin

Parent Category:
Calendar plugins
Last Updated:
Allon Moritz, Tuesday, 02 May 2023 15:50
Sunday, 20 December 2020 15:09

This feature is part of the DPCalendar Premium subscription.
SubscribePHP 7.4PHP 8Joomla 3.10Joomla 4.4Joomla 5


The Microsoft calendar plugin integrates events from your Microsoft 365 (formerly Office 365) calendars into Joomla through DPCalendar.

The most convenient way to make your Microsoft calendars accessible in DPCalendar is to import them, because the Microsoft graph API cryptic keys and tokens which are obtained during the import process. To be able to import the calendars you need to get first a tenant id, client id and client secret string from the Microsoft Azure portal as described below. During hte import process are all calendars of all available users imported.

To get a bigger picture how external calendars are handled inside DPCalendar read the article Integration/Import external calendars.

Tenant ID, Client ID and Client Secret

To be able to import your Microsoft calendars you need a tenant ID, client ID and client secret from the Microsoft Azure portal. This credentials are used to make authenticated requests against the microsoft graph API endpoint. It is called OAuth authentication and allows you to revoke the credentials at any time and doesn't expose your private username and password.

  1. Sign in to the Microsoft Azure portal using either a work or school account or a personal Microsoft account.
  2. If your account gives you access to more than one tenant, select your account in the top right corner, and set your portal session to the Azure AD tenant that you want.
  3. In the left-hand navigation pane, select the "Azure Active Directory" service. Microsoft select Azure
  4. Create a new app by clicking on "App registrations" > "New registration". Microsoft register app
  5. When the Register an application page appears, enter your application's registration information and click on "Register"
  6. On the app list click on the new app and then on "API permissions". DPCalendar needs a couple of permissions to be able to work with the events, they are explained below. All of the permissions must be "Application" permissions" and NOT "Delegated permissions". After you selected them, grant admin consent for them.
    • Calendars.ReadWrite
      To read the calendar data.
    • MailboxSettings.Read
      To get the categories of the events for individual event coloring.
    • User.Read.All
      To fetch the users during import. Microsoft app permissions
  7. In the same screen click on "Certificates & secrets" and create a new client secret. Copy the value to a temporary file as you need it later for the import and the value can be seen only once. Microsoft app secret

Import the Microsoft 365 Calendars

  1. Click on the import button in the plugin edit form.
  2. Copy paste the Tenant ID and Client ID from the app overview page and the Client Secret from the temporary file to the form.
  3. Click the "Import" button.
  4. The Microsoft 365 calendars should be imported into the DPCalendar Microsoft plugin.
Microsoft IDs


The Microsoft graph API does support attachments. They are stored in the cache folder of your Joomla installation temporary. The attachments itself are rendered in a separate layout in the file /plugins/dpcalendar/microsoft/tmpl/attachments.php. If you want to change that, then you need to copy it to /templates/{your template}/html/plg_dpcalendar_microsoft/attachments.php and change it to your needs.


Every event can be assigned to multiple categories. Each of these categories contains a color from one of the 24 presets. To assign the event categories to a real color, we use a template file (/plugins/dpcalendar/microsoft/tmpl/colors.php) to make the mapping. If you want to change that, then you need to copy it to /templates/{your template}/html/plg_dpcalendar_microsoft/colors.php and return an array with your preferred colors.

DPCalendar Options

These settings are the same for every calendar configured in the plugin.

Tenant ID [Type: Text]
The tenant ID from the Azure portal to authenticate. Please check the documentation for more information.
Client ID [Type: Text]
The client ID from the Azure portal to authenticate. Please check the documentation for more information.
Client Secret [Type: Text]
The client secret from the Azure portal to authenticate. Please check the documentation for more information.
User ID [Type: Text]
The user ID the events should be received from.
Calendar ID [Type: Text]
The calendar ID the events should be received from.
Access Token [Type: Text]
The access token will be generated during import of the pages.

Plugin Options

Caching [Type: List] [Default: Joomla]
Select whether to cache the calendar data.
The following options are available:
  1. Joomla
  2. Database
  3. Never
Cache Time [Type: Text] [Default: 900]
The time for the cache in sec.
Sync Start [Type: Text] [Default: -3 year]
The relative start date to sync from.
Sync End [Type: Text] [Default: +3 year]
The relative end date to sync from.
Sync Steps [Type: Text] [Default: 1 year]
The sync steps.

Comments (0)

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.