The Microsoft 365 tab allows administrators to integrate the CloudPBX with an Azure/Microsoft tenant and set up contact synchronization. The following fields and options are available:
Enable Sync: This toggle controls whether automatic synchronization with the external contact source is active.
No: The configuration will be saved, but no synchronization will occur regardless of the value set in Sync Interval (hours). In this case, contacts will not be synced until the user manually triggers the sync by clicking the Trigger Sync button.
Yes: Once the configuration is saved, the system will immediately perform a full synchronization of all contacts from the external source, and continue to sync them periodically based on the interval defined in Sync Interval (hours).
After the initial full sync, all subsequent sync operations will only process newly added, edited, or deleted contacts, ensuring efficient updates without re-importing all data.
This setting gives users control over whether syncing begins immediately or remains inactive until explicitly triggered.
Sync Interval (hours): Defines how often automatic synchronization will occur when sync is enabled. Default is 24 hours.
Client ID: Azure application client ID.
Client Secret: Secret key associated with the client ID.
Tenant ID: Microsoft 365 tenant identifier.
Trigger Sync: Immediately starts a manual synchronization process with the external contact source. Upon clicking, users are prompted with a confirmation dialog: "This action will trigger sync immediately. Are you sure you want to continue with this action?"
If this is the first time the sync is being triggered (i.e., no previous sync has occurred), the system will perform a full synchronization, importing all available contacts from the external source.
On subsequent uses, only newly added, edited, or deleted contacts will be processed and synchronized, minimizing load and ensuring the contact list stays up to date.
This option is useful for performing an immediate update outside of the regular sync interval or after adjusting configuration settings.
Erase Data: Removes both the contact data and the source configuration from the system. This includes all synced contacts and any associated activities. Users will be prompted with the following warning: "This action will delete all data related to Microsoft 365, including contacts and activities related to those contacts. Are you sure you want to continue with this action?"
Status Message: Displays the timestamp of the last successful sync along with the number of synced and deleted contacts.
When setting up an enterprise application in Microsoft Azure, one of the following Microsoft Graph permissions must be granted to enable contact synchronization:
OrgContact.Read.All
Directory.Read.All
Directory.ReadWrite.All
These should be added as Application permissions (not Delegated) in the Azure Portal under your work account. You can find them under the Microsoft Graph category in the API permissions section of the app.