Skip to main content

EWS Calendar Permission

Auto-generated

This page is imported automatically from an external repository.

Source project: Open repository

This module is used for syncing Exchange calendar permissions with ADITO calendar permissions. It uses Exchange Web Services (EWS) and therefore the ews module for handling the communication.

Permissions

To read calendar permissions from Exchange, the service account behind the configured EWS alias needs:

  • EWS Impersonation (ApplicationImpersonation role in Exchange) for every mailbox whose calendar permissions should be synchronized.
  • Basic authentication credentials that are stored on the Exchange (web service) alias used by this module.
note

Impersonation must be granted for the full set of target mailboxes. Users without the appropriate impersonation rights are silently skipped by the EWS response.

About this module

ewsSyncCalendarPermissions_serverProcess

This process starts the synchronization of calendar permissions. It uses the ews module for communication and the CalendarPermEws_lib process to better modularize the code.

The process fetches all calendar permissions for users that have an EXCHANGE_EMAIL (or CALENDARID as fallback) set in the user directory and are marked active. The set of users is restricted via the domain preference described below to avoid sending unnecessary requests to Exchange.

The response data is analyzed and permissions are written to the table AB_PERMISSIONCALENDAR.

Default permissions (i.e. permissions granted to the whole organization) are stored in the same table. Instead of one row per grantee, a single row is inserted with the grantee row id set to DEFAULT.

After the import, rows whose DATE_NEW and DATE_EDIT are older than the current sync run are deleted, so permissions that were revoked in Exchange are removed from ADITO as well.

note

The Exchange grants TimeOnly, TimeAndSubjectAndLocation, READ / FullDetails and WRITE are mapped to the ADITO categories freeBusy, limitedRead, fullRead and readWrite respectively. A write grant without a corresponding read grant cannot be represented in ADITO and causes an error.

CalendarPermEws_lib

Library that exposes the static utility class EwsClientCalendarPermissionUtils:

  • getRequestXMLforAlias(pAliasName, pRequestedMailAddresses) – builds the EWS plugin request XML for a set of mailboxes.
  • writePermissions(pExchangeAliasName) – full sync entry point used by the server process.

All exported functions can be overridden via the standard ADITO LibraryOverrideManager, allowing project-specific customization without forking the module.

Custom Properties / Configuration

custom.ews.alias (instance config property)

Name of the Exchange (web service) alias used to authenticate against Exchange. The alias must be reachable by the EWS client plugin and the account behind it must be allowed to impersonate the target mailboxes.

custom.ews.exchangeMailDomain (custom property)

Domain suffix used to limit which users are synchronized. Only users whose EXCHANGE_EMAIL (or CALENDARID) contains this value are included in the permission sync.

Example value: @mycompany.com

https://gitlab.adito.de/xrm-modules/xrm-contactmanagement/ews
https://gitlab.adito.de/xrm-modules/xrm-contactmanagement/ews-sync