Allowing Microsoft OneDrive Links in Documents

Overview

This guide shows you step by step guide to set up a new integration project with Microsoft OneDrive allowing files stored in OneDrive to be linked to within the Intranet.

⚠️ This feature is available from Claromentis 8.5+, your site must be using 'https://' and be publicly accessible (no VPN or RDP required) for the API to work.

How to

 

Step 1: Log in to Microsoft Azure Portal

https://portal.azure.com

Login to Microsoft Azure Portal with your Microsoft ID or register if you don't have one.

 

You need to register a new application by searching for App Registration

 

 - Name your system name for example "My Intranet OneDrive Picker"

 - Supported account types: Choose between Organisation only and or allowing a personal Microsoft account too

 - Redirect URI: set to Web  https://{yourcompany.myintranet.com}/intranet/documents/onedrive_callback.php

 - Click: Register

 

 

Step 2: Set up API permission

Click on 'View API permissions':

 

Add API permission for the following:

Microsoft Graph > Delegated Permission

  • Files.Read
  • Files.Read.All
  • Files.Read.Selected
  • User.Read

 

Step 3: Setup Authentication - Implicit Grant

The redirect URL was configured in Step 1, so now under Advanced Settings make sure Implicit Grant Flow authorisation via Access tokens and ID tokens have their boxes checked:

 

Step 4: Branding (optional)

 

Step 5: Copy Application (Client) ID

Before you leave the portal and start using the details given to set up the OneDrive API in Claromentis make sure you copy the Application (client) ID - (field shown below that is obscured)

 

 

Step 6: Set up API Integration in Claromentis

 - In Claromentis navigate to Admin > System > API keys

 - Click Add New Integration

 

Enter the below for each field offered

API Name: onedrive_picker

API Description: OneDrive Document Picker

Entry Key: client_id

Entry Value: {paste value of Application (client) ID here that you copied}

 

Step 7: Testing & Verification

Head to Documents application

Click to add a document using the OneDrive option

 

On the next screen click to 'Browse OneDrive Documents' and you will be prompted to authorise your access.

 

 

Document Preview

The majority of files from OneDrive can't be previewed directly in the Documents application, instead, a message will appear and the user can click "View Documents" to access the document.


 

As the link is just that and not the actual file, users will be prompted to log into Microsoft when following a OneDrive link in the Intranet (by clicking 'view document' in the Intranet) The permissions set in OneDrive will then allow or restrict the user from viewing/downloading the file once they log in.

 

Whether a preview appears is not something that can currently be changed as the document URL provided by OneDrive does not allow its content to be embedded and create the preview.

Consider uploading files into the Claromentis documents application to use its preview instead of linking to OneDrive if a preview for them is more critical than where they are stored.
 

The file types that OneDrive does allow to be embedded and therefore allow the preview to appear in the Intranet:

doc, docx Microsoft Word Documents
xls, xlsx Microsoft Excel File
odt, ods Open Document Text File and Open Document Spreadsheet

Unfortunately, OneDrive PDF files do not allow themselves to be embedded so no Intranet preview can be created for these.

 

Further info 


 

Troubleshooting:

If you can't see the option to add OneDrive, please check Admin > Documents  and make sure ERMS_CONFIG_ONEDRIVE_LINKS is set to ON, Please contact our support team if you need further assistance.

To make these changes, navigate to Admin > System > Configuration and search for cfg_docs_features

 

Last modified on 25 September 2024 by Hannah Door
Created on 26 September 2019 by Michael Christian

Was this helpful?  

Share