3CX integration with Office 365 through the Azure API

  • Tutorial
PBX 3CX v16 edition of Pro and Enterprise offers full integration with Office 365 applications. In particular, implemented:

  • Synchronize Office 365 users and 3CX extensions (users).
  • Synchronize personal contacts between Office users and your 3CX personal address book.
  • Synchronize Office 365 user calendar status (busy) and 3CX extension status.   

To make outgoing calls from the Office application web interface, 3CX uses the 3CX Click to Call extension for Chrome and Firefox browsers . You can also use keyboard shortcuts in the 3CX Windows application .

To get started, you will need an Office 3CX subscription and Office portal administrator credentials with Global Administrator privileges.

Some Office 365 subscriptions have limited or no 3CX integration at all:

  • Subscriptions without user management i.e. all home subscriptions.
  • Subscriptions without Exchange cannot sync contacts and calendar (Office 365 Business and Office 365 Pro Plus).

Office 365 servers must have a direct connection to your 3CX server for real-time status reporting. If it is not possible to provide a permanent connection, 3CX will still perform daily synchronization.

Please note that synchronization is only one way - from Office 365 to 3CX. For successful synchronization, Office 365 users must have the “UserType” attribute set to “Member” (set in Active Directory). If a user synchronized from Office 365 is deleted or modified through the 3CX interface, he will return to the previous state during the next manual or automatic synchronization.

Microsoft Azure Authentication Application

The first step to connecting Office 365 integration is to create a personalized application in your account to authorize integration.

  1. In the 3CX management interface, go to Settings - Office 365 - Settings tab - Step 3 section and copy the Redirect URL.
  2. Log in to the Office 365 portal with Global Administrator credentials and go to the Microsoft Azure Application Registration page .
  3. Click New Registration and enter the name of the application, for example, 3CX PBX Office 365 Sync App.
  4. In the Supported account types section, leave the default option Accounts in this organization directory only
  5. In the redirect URI section (optional), specify the Web type and insert the redirect URI from the 3CX interface section: Settings> Office 365 Integration> Settings tab> Section Step 3. Platform and permissions, for example, company.3cx.eu : 5001 / oauth2office2
  6. Click Register and the application will be created.
  7. The settings page of the created application opens. Copy the value of the Application Identifier (client) and paste it into the corresponding field in the 3CX management interface, Settings> Integration with Office 365> Settings tab> Step 1. Configure the App ID.

Authentication Keys

Now you need to establish a public key trust relationship between your 3CX v16 system and the application you created in the Office 365 portal.

  1. In the 3CX interface (Settings> Integration with Office 365> Settings tab), click Generate a new key pair and save the public_key.pem key.
  2. Go to the application settings page in the Certificates and Secrets section. Click Submit Certificate and upload the generated key.

Application Permissions

The final configuration step is to set the API permissions in the API Permissions section. These permissions determine how your 3CX system accesses your Office 365 account.

  1. Go to the API Permissions section, click Add Permission and select Microsoft Graph.
  2. Add API permissions in the Application Permissions section: Calendars> Calendars.Read, Contacts> Contacts.Read, Directory> Directory.Read.All, and click Add Permissions.
  3. In the Grant Consent section, click Grant administrator consent for ... to activate permissions.
  4. Wait about 10 minutes for the changes to take effect correctly.
  5. Switch to the 3CX interface and in the Integration with Office 365 section, click Sign in to Office 365. Confirm the permissions for the created application and the connection between the systems will be established.

Sync Features

Synchronization between 3CX and Office 365 is configured in three tabs:

  • User synchronization - Office 365 users are synchronized with 3CX users (extension numbers). In the 3CX management interface, synchronized users are hosted in an Azure AD organizational group.
  • Contact sync - Office 365 personal contacts are synced with your 3CX address book. The user sees these contacts in 3CX applications for all platforms.
  • Calendar Sync - Automatically change the status of the 3CX extension based on your workload on the Office 365 calendar:

After the event is completed on the Office 365 calendar, 3CX user status is also synchronized and returned to its previous state.

All synchronization items can be configured for all Office 365 users as well as for selected users.

This completes the integration.

Also popular now: