Connect ExtraFax for Exchange with Office 365 / OneDrive for Business / OneDrive

Link:  http://www.extracomm.com/Extracomm/FAQ.NSF/FAQs/2092b6bbbdbbef1c48257f4d0027e36b
Apply to:  ExtraFax for Exchange

Last Modified Date:  09/01/2018


Connect ExtraFax for Exchange with Office 365 / OneDrive for Business / OneDrive

You can setup ExtraFax to connect to Office 365 / OneDrive. This will be useful if you want to achieve the following objectives:

  1. Import Office 365 users to ExtraFax
  2. Route incoming faxes to OneDrive for Business or OneDrive automatically

ExtraFax for Exchange connects to Office 365 / OneDrive using the OAuth 2.0 protocol.


Import Office 365 users to ExtraFax

You need to do the following:

    • Create a "Web application" type application in Azure Active Directory using an administrator account for your Office 365 tenant
    • Create an OAuth 2.0 provider in ExtraFax
    • Create an OAuth 2.0 Authorization User Rule in ExtraFax to import the required users from Office 365


Route incoming faxes to OneDrive for Business

You need to do the following:

    • Create a "Web application" type application in Azure Active Directory using an administrator account for your Office 365 tenant
    • Create an OAuth 2.0 provider in ExtraFax
    • Create an Inbound Routing Rule that will route faxes to a OneDrive for Business folder that is connected with an Office 365 user account in your tenant

Route incoming faxes to OneDrive

You need to do the following:

    • Create a OneDrive API application in Microsoft App Registration Portal using a personal Microsoft account
    • Create an OAuth 2.0 provider in ExtraFax
    • Create an Inbound Routing Rule that will route faxes to a OneDrive folder connected with a particular personal Microsoft account



Implementation Details

The sections below describe the configuration details.



Create a Web Application in Azure Active Directory

1) Sign in to Office 365 and go to "admin center".


2) Select "Azure Active Directory" on the left side menu.



3) Select "Azure Active Directory" -> "App registrations" -> "New application registration".


4) Specify a name for the application and specify the sign-on URL as follow:

SIGN-ON URL: <http protocol>://<extrafax server dns name>/signin/<provider-name>
For example, https://faxserver.adatum.com/signin/o365


5) Application was created. Click "Settings".

6) Click "Reply URLs".


7) Enter the following URL:

a) If you plan to import users from Office 365, add <http protocol>://<extrafax server dns name>/auth2/microsoft_oauth2/callback_login
For example, https://faxserver.adatum.com/auth2/microsoft_oauth2/callback_login

b) If you plan to route faxes to OneDrive for Business, add <http protocol>://<extrafax server dns name>/auth2/microsoft_oauth2/callback
For example, https://faxserver.adatum.com/auth2/microsoft_oauth2/callback

If you plan to do both a) and b) please specify both URLs.
After you added the Reply URLs, click "Save".



8a) Under "Settings", click "Required Permissions".


8b) Click "Windows Azure Active Directory".

8c) Under "Delegated Permissions" (NOT "Application Permissions"), select the following:
- Read all users' full profiles
- Sign in and read user profile

And then click "Save".

8d) Click "Grant permissions".

8e) Click "Yes" for this message box.


9a) If you plan to route faxes to OneDrive for Business, click "Add" under "Required permissions".

9b) Click "Select an API".


9c) Select "Office 365 SharePoint Online".


9d) Under "Delegated Permissions" (NOT "Application Permissions"), select the following:
- Read and write items and lists in all site collections

And then click "Select".


9e) Click "Grant permissions".

9f) Click "Yes" for this message box.

10) Under "Settings", click "Keys".


11) Input a description, expiration period and leave the value field blank (This will generate a new password for you).


12) Click "Save". When finished, you will be presented with a new password. Copy the password
to a notepad and save it. Note that you won't be able to retrieve the key value after you leave the page.

13) Also copy the "Application ID" to notepad and save it.


14) Now you have recorded the application ID and password in the notepad and these values will be used in the next section.




Create an OAuth 2.0 provider in ExtraFax

1. Sign in to ExtraFax as administrator. Under "System Management", click "OAuth 2.0 Provider" on the left menu. Click "New".
Fill in the details using the Client Id (that is Application ID) and the password obtained when you created the Web Application in Azure Active Directory (see section above).
Use the syntax <http protocol>://<extrafax server dns name>/auth2/microsoft_oauth2/callback for the field Redirect URL.

Specify <provider-name> for the name field. ( Please refer to step 4 in the section above for <provider-name>)

Select "Microsoft Office 365 + Azure AD" for the Provider field.

Click Save.





Create an OAuth 2.0 Authorization Rule in ExtraFax

1) Sign in to ExtraFax as administrator. Under "Organization Management", click "OAuth 2.0 Authorization". Click "New".
Specify a name for the new rule. Select "Microsoft Office 365 + Azure AD" for Provider Type. Select the provider created in the section above as the OAuth 2.0 provider.


2) Under "Windows Azure AD" section in the page, click "Sign in". A window "Sign in to your account" from Microsoft will pop up. Sign in with your Office 365 account.
The sign-in process will take for a while. When succeed, you will be presented with a screen similar to the one below. Close the window.



3) On the New OAuth 2.0 Authorization Rule page, make sure your Azure Directory domain is loaded in the "Domain" drop down list. In "User Selection", specify how ExtraFax should import the users from your Office 365 tenant.


4) Specify a group name if you want to import only users from a specific group.


5) Specify required criteria if you want to import users that meet specific criteria. This gives you more control on how users are imported.


6) Click "Save and Import" when you are done.

7) The new rule will be created and user import will be started and running. Please manually refresh the page to see the import progress.



8) When import finished successfully, new users will be imported and can be found in the User left menu.

9) To sign in to ExtraFax using Office 365 login account, browse to the Provider Direct Sign In Page ( See step 7). You will be redirected to Microsoft for sign in. Once authenticated, you will be redirected back to ExtraFax WebFax.

You can also access ExtraFax WebFax application from Office 365's "Apps" page as following:
- Click "All apps" and you will find ExtraFax in the "Other" section.







Create a OneDrive API Application using Microsoft Account

Note: Please follow the instruction in this section ONLY if you want to route fax to OneDrive that is associated with a Microsoft account.

1) Sign in to Microsoft App Registration Portal (https://apps.dev.microsoft.com).

If this is the first application you are creating, you will be presented with "My applications" page.
Click "Add an app" to create a new application.

2) Input the "Application Name" (e.g. ExtraFax) and click "Create".


Type in Application name. e.g. ExtraFax
Click the "I accept" button.

3) Click "Create New Password".

4) A message box will be shown. Copy the generated password and save it to notepad.


5) Click "Add Platform".


6) Select "Web" platform.



7) Input "Redirect URLs". Use the syntax <http protocol>://<extrafax server dns name>/auth2/microsoft_oauth2/callback for the field Redirect URLs.

For example, https://faxserver.adatum.com/auth2/microsoft_oauth2/callback



8) Copy the Application Id and save it to notepad.


9) Now you have recorded the application ID and password in the notepad and these values will be used in the next section.



Create an OAuth 2.0 provider in ExtraFax

Note: Please follow the instruction in this section ONLY if you want to route fax to OneDrive that is associated with a Microsoft account.

1. Sign in to ExtraFax as administrator. Under "System Management", click "OAuth 2.0 Provider" on the left menu. Click "New".
Fill in the details using the Client Id (that is application ID) and the password obtained when you created the Web Application in Azure Active Directory (see section above).
Use the syntax <http protocol>://<extrafax server dns name>/auth2/microsoft_oauth2/callback for the field Redirect URL.

Specify a name for the Name field.
Select "Microsoft account" for the Provider field.

Click Save.






Specify OneDrive / OneDrive for Business in Inbound Routing Configuration

1) Sign in to ExtraFax as administrator. Under "System Management", click "Inbound Routing Configuration". Click "New" or "Edit" an existing configuration.

2) In "Route to File System", select "Cloud Storage". Select the provider created previously. Click "Specify Folder Path".


3) A window "Sign in to your account" from Microsoft will pop up. Sign in with your Office 365 account or Microsoft account. You will be prompted to grant access to the application created previously (either a Web Application in Azure or a OneDrive API application). Click Allow to continue.
When succeed, you will be presented with a success screen. Close the window.

4) On the Inbound Routing Configuration page, your Office 365 or Microsoft account name will be shown. Specify the folder in your OneDrive for Business / OneDrive where the incoming faxes will be stored.


5) Click "Save" to save the configuration.

6) You may send a test fax to ExtraFax server to verify that incoming faxes are saved in the specified OneDrive for Business or OneDrive folder.


Important Note: By default, ExtraFax use the same filename "AllPages.pdf" when saving file. To avoid overwriting old files, please enable the setting "Insert Timestamp and Fax Record Number Prefix to Incoming Fax Filename" under Organization -> Inbound Settings.