Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Microsoft is ending support for basic authentication beginning 1st October 2022. thus we need to change the Authentication to Oauth2.0

Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
printablefalse

Steps or guidelines to integrate outlook calendar

...

  1. Login to https://portal.azure.com using your outlook account which has an office 365 subscription.

  2. After logging in search and select  App Registration in the top search box.

    Image RemovedImage Removedpasted image 1.pngImage Addedpasted image 2.pngImage Added
  3. Click on new registration.

  4. Enter the following details marked in the screen shot.

    Image Removedpasted image 3.pngImage Added

    Name: Enter the name of the application as your convenience
    Account Types: Please select second option (Any Azure AD directory - Multitenant)
    Redirect URI: Select the web option from the redirect URI drop down and enter your PBX calendar module’s URI. This is optional at this step you can add this later after registering the application.Click on Register button to register the application
    Note:
    a. The redirect URI should always be your PBX url appended with the calendar module. 
          Ex : https://pbx.domain/admin/config.php?display=calendar
    b. Your PBX domain should HTTPS 

    Note: The HTTPS port should be open only when user trying to generate authorize token while adding Outlook Oauth2 config, once authorization done, they can disable https port if user wish.
             

...

5. After Registering the the application you will get the client details

...

  1. Adding API permissions to the registered application

...

Select Microsoft Graph -> Delegated Permissions -> select offline_access and Calendars.ReadWrite permissions -> click Add permission button

...

pasted image 8.pngImage Added

pasted image 9.pngImage Added

pasted image 10.pngImage Added

7. After adding permissions Grant admin consent for these permissions (this step is not mandatory). To grant that just click on Grant admin consent button.

...

8. Getting client secret key

Navigate to Certificates and secrets tab on left menu -> click on New client secret button -> enter description -> select expiration time -> Add

...

  1. Ensure FreePBX had HTTPS setup done and login to FreePBX system, Once outlook authorize token generation is done, user can disable to https port if they wish (Not a mandatory for viewing the calendar) Login to system using https and Go to the outlook Config page by clicking on the Outlook Oauth2 Config buttons calendar list page. Then Click on Add Config

    image2023-1-12_18-40-55.pngImage Added

    Image RemovedImage Removed

    image2023-1-12_18-46-53.pngImage Added

2. Enter all the details which you got by completing the app registration in azure portal.

...

  1. Click on Save.

  2. After saving the credentials, it will redirect to allow api permission page, pls allow them, once done the Authorization button will be enabled.

  3. If you are not getting redirected to allow the permission then Click Authorization button to generate Oath token for Microsoft APIs on clicking Authorize access button it will ask for Microsoft account login and access permission.

  4. Please login with the Microsoft account which has proper office 365 subscription or else the outlook calendar sync will not work. 

  5. On allowing access it redirects back to the calendars module home page.

    Image Removedimage2023-1-25_11-46-14.pngImage Added
  6. Select Add Remote Outlook Calendar using Oauth2 from the add calendar dropdown.

Image Removedimage2023-1-9_10-30-28.pngImage Added

  1. Add an outlook calendar by filling out all the required fields and selecting the outlook config created earlier (after entering the proper email and selecting proper config the users calendars are listed please select the desired calendar or else default  user calendar will be selected automatically). Submit and save calendar

    Image Removedimage2023-1-25_11-42-3.pngImage Added

10. Go to calendar view and then click on update from source button to sync the calendar.

...