Symptoms
- Office 365 5.0.x - 16.6.x is used on your Odin Automation installation.
- Changes which are made by an Office 365 customer in the Microsoft Online Services Portal are not automatically propagated to Odin Automation.
Cause
Versions 3.x - 4.x of the Office 365 application support background 2-way synchronization (see Odin Automation Office 365 Integration Provider's Guide >> Finalizing Office 365 Application Deployment > Synchronizing Changes Applied in Microsoft Online Services Portal to PA (http://download.pa.parallels.com/poa/Office365/doc/71781.htm)).
In versions 5.0.x - 16.6.x of the Office 365 application, 2-way synchronization is also supported, but it requires manual intervention (see Odin AutomationOffice 365 Integration Subscriber's Guide >> Synchronizing Office 365 Organization with Microsoft Online Services Portal (http://download.automation.odin.com/poa/Office365_APS2/doc/index.htm?fileName=89725.htm)).
Resolution
This article offers a temporary solution to the issue described above. It is a script that starts background synchronization and helps to automate this task.
Log on to the OA Billing Application Server (BALINFE) as root.
Install the following RPM packages:
- perl-REST-Client
- perl-Frontier-RPC
- perl-Frontier-RPC-doc
The RPM packages are attached to the KB article https://kb.cloudblue.com/en/122059.
Example for CentOS 6.5:
- Execute the
yum install perl-Frontier-RPC perl-Frontier-RPC-doc perl-XML-LibXML
command. - Execute the
rpm -i perl-REST-Client-271-1.el6.noarch.rpm
command.
Put the backsynco365.pl file to the
/usr/local/o365
directory.Execute the
chmod +x /usr/local/o365/backsynco365.pl
command.In the
backsynco365.pl
file, specify the following parameters:$officeappid - Application ID of the Office 365 APS application.
Important: Application ID is different from Instance ID.
$appinstance - Instance ID of an instance of the Office 365 APS application (optional). When -1 is specified (the default value), the script takes into account all instances. When an individual instance is specified, the script takes into account only the specified instance.
$poa - The BackNet IP address of the OA Operations Management Node.
- $poaport - The port of the OA Operations Public API. The default value is 8440.
Put the backsynco365_watchdog.sh file to the
/usr/local/o365
directory.Execute the
chmod +x /usr/local/o365/backsynco365_watchdog.sh
command.- Add the
* * * * * * /usr/local/o365/backsynco365_watchdog.sh
line to crontab using thecrontab -e
command.
Note: If you need to view synchronization logs, go to the /var/log/sync/
directory.
Internal content
When processing customer tenants of application instances, the
backsynco365.pl
script interacts with APSC. This requires an alive APS security token, which has a limited lifetime (30 minutes) and is regenerated by the script after processing every 100 customer tenants. If the script processes 100 customer tenants longer than 30 minutes, the APS security token expires and the script fails with the following error message:'error' => 'APS::Hosting::Exception', 'message' => 'Authentication failed.'
If you have such a problem, you can decrease the number of customer tenants which must be processed before the APS security token is regenerated. To do this, modify the following place in the
backsynco365.pl
script:foreach my $tenant(@$instancesubscriptions){ if($counter % 100 == 0){ logger("Refreshing App Token for APP instance ".$appintance->{'application_instance_id'});
- The backsynco365-20151113.pl fails when it receives an unexpected response from the application endpoint. If you have such a problem, replace the script with its backsynco365.pl.