📜 ⬆️ ⬇️

3CX integration with Office 365 through the Azure API

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


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

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 integration with 3CX:


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

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

Microsoft Azure Authentication Application




The first step in connecting an Office 365 integration is to create an individual application in your account to authorize the integration.

  1. In the 3CX management interface, go to Settings - Office 365 - Settings tab - Step 3 section and copy the Redirect URL.
  2. Log into the Office 365 portal with Global Administrator credentials and go to the Microsoft Azure Application Registration page.
  3. Click New Registration and specify the name of the application, for example, the 3CX PBX Office 365 Sync App.
  4. In the Supported Account Types section, leave the default option, Accounts only in this directory, organization
  5. In the Redirection URI section (optional), specify the Web type and insert the redirect URI from the 3CX interface section: Settings> Office 365 Integration> Settings 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 will open. Copy the Application Identification (Client) value and paste it with the appropriate field in the 3CX management interface, Options> Office 365 Integration> 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 created in the Office 365 portal.

  1. In the 3CX interface (Settings> Office 365 Integration> Settings tab), click Generate a new key pair and save the key public_key.pem.
  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 define the rules for your 3CX system to access an 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 admin 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 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.



Synchronization capabilities


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


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

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



This integration is complete.

Source: https://habr.com/ru/post/452838/


All Articles