Best Practices for Office 365 two-way sync

Article ID: 119095, created on Dec 10, 2013, last review on May 10, 2014

Applies to:

Operations Automation 5.4

Microsoft Office 365 does allow tenant administrators to apply changes to their domains, users, and license assignments directly in the Microsoft Online Portal (MOP).
If those changes are not applied on the Parallels Automation (PA) end, the functionality of the Parallels Automation Control Panel can be negatively affected.
The most common issues observed when the MOP and PA go out of sync are:

Customer subscriptions cannot be cancelled as there are some users not known to PA

Attempts to assign O365 services to the PA users fail because no licenses are actually available

Failure to create new users on some domains in PA since those domains are not registered in PA

The suggested way to resolve those issues is to keep MOP and PA in sync, using a special script written by Parallels.
This is considered to be an integral part of the Office 365 Module maintenance, as skipping this activity leads to the support costs increase.

It is recommended to run this script on a time basis, using cron on Linux or Task Manager on Windows

It is not recommended to run multiple script instances in parallel Therefore, before setting up the regular execution, it is recommended to perform a first sync manually and measure the full sync duration.

It is recommended to run full sync at an interval approximately equal to 1.5 * (full sync duration).

The synchronization log files should be monitored on a regular basis, checking the following:

Script execution summary at the end of the log file

Sync duration. If it grows above 70% of the sync interval, then increase the sync interval. If it falls below 50% of the sync interval, then decrease the sync interval (see item 3 above for the recommended interval)

Subscriptions not synced because of errors (should be 0)

Subscriptions requiring manual attention (should be 0)

Log detail (if necessary)

Synchronization errors (grep for "error by" strings): review those and attempt to fix the error conditions

Synchronization failures (grep for "unable to update"): review those and attempt to perform the manual sync