3CX version 16 Pro and Enterprise offers full integration with Office 365 applications. In particular, it implements:
- Synchronization of Office 365 users and 3CX extensions (users).
- Synchronization of users' personal contacts and the 3CX personal address book.
- Synchronization of the availability statuses from the Office 365 user's calendar and 3CX extension status.
To make outgoing calls from the Office applications web interface, 3CX uses the extension for browsers. og Keyboard shortcuts can also be used in the .
To get started, you will need a 3CX Office subscription and the administrator credentials for the Office portal with 'Global Administrator' privileges.
Some Office 365 subscriptions have limited integration capabilities with 3CX or none at all:
- Subscriptions without user management, i.e., all 'home' subscriptions.
- Subscriptions without Exchange cannot synchronize 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 updates. If a constant connection is not possible, 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, it will revert to its previous state during the next manual or automatic synchronization.
Microsoft Azure Authentication App

The first step in connecting is to create a custom app in your account for authorization of the integration.
- In the 3CX management interface, go to Settings - Office 365 - Options tab - Step 3 section and copy the Redirect URL.
- Log into the Office 365 portal with Global Administrator credentials and navigate to the .
- Click New registration and enter the application name, for example, 3CX PBX Office 365 Sync App.
- In the Supported account types section, leave the default option for accounts only in this organizational directory.
- I afsnittet for URI-omdirigering (valgfrit) angiv typen Web og indsæt URI-omdirigeringen fra 3CX-grænsefladens sektion: Indstillinger > Integration med Office 365 > fanen Indstillinger > sektion Trin 3. Platform og tilladelser, for eksempel, :5001/oauth2office2
- Klik på Registrer, og appen vil blive oprettet.
- Siden for indstillingerne for den oprettede app åbnes. Kopier værdien for App-id (klient) og indsæt den i det relevante felt i 3CX-administrationsgrænsefladen, Indstillinger > Integration med Office 365 > fanen Indstillinger > Trin 1. Konfigurer App ID.

Autentificeringsnøgler
Nu skal der oprettes et tillidsforhold med den offentlige nøgle mellem dit 3CX-system v16 og den oprettede app i Office 365-portalen.
- I 3CX-grænsefladen (afsnit Indstillinger > Integration med Office 365 > fanen Indstillinger) skal du klikke på Generer nyt nøglepar og gemme nøglen public_key.pem.
- Gå til appens indstillingssiden i afsnittet Certifikater og hemmeligheder. Klik på Upload certifikat og upload den oprettede nøgle.


Tilladelser til appen
Den sidste del af konfigurationen er at indstille API-tilladelserne i sektionen API-tilladelser. Disse tilladelser definerer adgangen af dit 3CX-system til Office 365-kontoen.
- Gå til sektionen API-tilladelser, klik på Tilføj tilladelse, og vælg Microsoft Graph.
- Tilføj API-tilladelserne i sektionen App-tilladelser: Calendars > Calendars.Read, Contacts > Contacts.Read, Directory > Directory.Read.All, og klik på Tilføj tilladelser.
- I sektionen Giv samtykke skal du klikke på Giv administrator-samtykke til … for at aktivere tilladelserne.
- Vent cirka 10 minutter, så ændringerne korrekt træder i kraft.
- Skift til 3CX-grænsefladen, og i sektionen Integration med Office 365 skal du klikke på Log ind i Office 365. Bekræft tilladelserne for den oprettede app, og forbindelsen mellem systemerne vil blive etableret.

Synkroniseringsmuligheder
Synkronisering mellem 3CX og Office 365 konfigureres i tre faner:
- Bruger-synkronisering — Office 365-brugere synkroniseres med brugere (tilføjelsesnumre) i 3CX. I 3CX-administrationsgrænsefladen placeres de synkroniserede brugere i Azure AD-organisationsgruppen.
- Kontakt-synkronisering — personlige kontakter fra Office 365 synkroniseres med adressebogen i 3CX. Brugeren kan se disse kontakter i 3CX-applikationerne på alle platforme.
- Kalendersynkronisering — automatisk ændring af status for 3CX-tilføjningsnummeret afhængigt af kalenderaktiviteter i Office 365:
Når en begivenhed i kalenderen for Office 365 er afsluttet, synkroniseres 3CX-brugerens status også og vender tilbage til sin tidligere tilstand.
Alle synkroniseringselementer kan konfigureres både for alle Office 365-brugere og for udvalgte brugere.

Integrationen er nu fuldført.
Kilde: habr.com
