3CX integration with Office 365 via Azure API

PBX 3CX v16 of the Pro and Enterprise editions offers full integration with Office 365 applications. In particular, it has implemented:

  • Synchronization of Office 365 users and 3CX extensions (users).
  • Synchronization of personal contacts of Office users and personal address book 3CX.
  • Synchronization of the statuses (busy) of the Office 365 user calendar and the status of the 3CX extension.   

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

To get started, you'll need an Office 3CX subscription and Office Portal Administrator credentials with "Global Administrator" privileges.

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

  • 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 in order to transmit real-time statuses. If a persistent connection is not possible, 3CX will still sync daily.

Please note that synchronization is performed only in one direction - from Office 365 to 3CX. To successfully sync, 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, it returns to the previous state during the next manual or automatic synchronization.

Microsoft Azure Authentication Application

3CX integration with Office 365 via Azure API

First connection step Office 365 integrations β€” creation of an individual application in your account for integration authorization.

  1. In the 3CX management interface, go to Settings - Office 365 - Settings tab - Step 3 section and copy the Redirect URL.
  2. Sign in to the Office 365 portal with your Global Administrator credentials and navigate to the page Microsoft Azure Application Registrations.
  3. Click New Registration and provide a name for the application, such as 3CX PBX Office 365 Sync App.
  4. Under Supported account types, leave the default option Accounts in this organization directory only.
  5. In the Redirect URI (optional) section, specify the Web type and paste the redirect URI from the 3CX interface section: Settings > Office 365 Integration > Options tab > Step 3 section. Platform and Permissions, for example, company.3cx.eu:5001/oauth2office2
  6. Click Register and the application will be created.
  7. The settings page for the created application opens. Copy the App ID (client) value and paste it into the appropriate field in the 3CX management interface, Settings > Office 365 Integration > Options tab > Step 1. Set up an App ID.

3CX integration with Office 365 via Azure API

Authentication Keys

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

  1. In the 3CX interface (Settings > Office 365 Integration > Options 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 Upload Certificate and upload the generated key.

3CX integration with Office 365 via Azure API
3CX integration with Office 365 via Azure API

App Permissions

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

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

3CX integration with Office 365 via Azure API

Synchronization options

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

  • User synchronization - Office 365 users are synchronized with 3CX users (extensions). In the 3CX management interface, synced users are placed in an Azure AD organization group.
  • Contact sync - Office 365 personal contacts sync with your 3CX address book. The user sees these contacts in 3CX applications for all platforms.
  • Calendar synchronization - automatically change the status of the 3CX extension depending on the busyness in the Office 365 calendar:

After the event ends in the Office 365 calendar, the 3CX user's status is also synchronized and returned to its previous state.

All sync items can be configured for all Office 365 users or for selected users.

3CX integration with Office 365 via Azure API

This completes the integration.

Source: habr.com

Add a comment